<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
  <link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css' /><title>mongod &mdash; MongoDB Manual</title><link rel="shortcut icon" href="https://media.mongodb.org/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index" />

  <meta name="release" content="4.2.5"/>
  <meta name="version" content="4.2"/>
  <meta name="DC.Source" content="https://github.com/mongodb/docs/blob/v4.2/source/reference/program/mongod.txt"/>
  <meta property="og:image" content="http://s3.amazonaws.com/info-mongodb-com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
  <meta property="og:image:secure_url" content="https://webassets.mongodb.com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
      <link rel="canonical" href="https://docs.mongodb.com/manual/reference/program/mongod" />
  
   <link rel="stylesheet" href="../../_static/mongodb-docs.css" type="text/css" />
   <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
   <link rel="stylesheet" href="../../_static/css/navbar.min.css" type="text/css" />
    
    <script type="text/javascript" src="../../_static/lib/jquery.min.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/lib/bootstrap.js"></script>
    <script type="text/javascript" src="../../_static/lib/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../_static/controller.js"></script>
      <link rel="search" type="application/opensearchdescription+xml" href="https://docs.mongodb.com/osd.xml" title="MongoDB Help"/>
<link rel="author" title="About these documents" href="../../about.html" />
<!-- <link rel="index" title="Index" href="../../genindex.html" /> -->
<link rel="search" title="Search" href="../../search.html" />
<link rel="top" title="MongoDB Manual" href="../../index.html" />
<link rel="up" title="MongoDB Package Components" href="../program.html" />
<link rel="next" title="mongos" href="mongos.html" />
<link rel="prev" title="MongoDB Package Components" href="../program.html" /><script type='text/javascript'>
   var gptadslots=[];
   var googletag = googletag || {};
   googletag.cmd = googletag.cmd || [];
   (function(){ var gads = document.createElement('script');
      gads.async = true; gads.type = 'text/javascript';
      var useSSL = 'https:' == document.location.protocol;
      gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
      var node = document.getElementsByTagName('script')[0];
      node.parentNode.insertBefore(gads, node);
   })();
</script>

<script type="text/javascript">
   googletag.cmd.push(function() {

      var pathname = location.href;
      
      if ( (pathname.indexOf("auth") >= 0) || (pathname.indexOf("security") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/security', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if ( (pathname.indexOf("crud") >= 0) ||  (pathname.indexOf("query") >= 0) || (pathname.indexOf("insert") >= 0) || (pathname.indexOf("update") >= 0) || (pathname.indexOf("remove") >= 0) || (pathname.indexOf("delete") >= 0) || (pathname.indexOf("aggregation") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/crud', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("shard") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/sharding', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("replica") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/replication', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("model") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/data-modeling', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("administration") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/support', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("install-mongodb-on-windows") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/install-mongodb-on-windows', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("tutorial/getting-started") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/docs_server_gettingstarted', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else {
         //Adslot 1 declaration
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      }
      googletag.pubads().enableSingleRequest();
      googletag.pubads().enableAsyncRendering();
      googletag.enableServices();
   });
</script></head>
<body data-project="manual" data-project-title="MongoDB Manual" data-branch="v4.2" data-enable-marian=1>
  <!-- Google Tag Manager -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-JQHP"
                    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push(
     {'gtm.start': new Date().getTime(),event:'gtm.js'}
   );var f=d.getElementsByTagName(s)[0],
   j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
   '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
   })(window,document,'script','dataLayer','GTM-JQHP');</script>
  <!-- End Google Tag Manager -->
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server","active": true},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>
      <script>
        window.googleSearchCx = "017213726194841070573:WMX6838984"
	window.googleSearchPlaceholder = "Search Documentation"
        window.googleSearchResultsUrl = "http://docs.mongodb.com/manual/search/"
      </script>
    <script src="../../_static/navbar.min.js"></script>
  

  <div class="content" >

   <div id="left-column">
         <aside id="sidebar" class="sidebar">
             
  <div class="sphinxsidebar" id="sphinxsidebar">
    <div id="sphinxsidebarwrapper" class="sphinxsidebarwrapper"><a href="javascript:void(0)" class="closeNav" id="closeNav">Close &times;</a>


<h3>
  <a class="index-link" href="../../index.html">MongoDB Manual</a>
</h3>


    <div class="btn-group version-sidebar">
      <button type="button" class="version-button dropdown-toggle" data-toggle="dropdown">
        
        
        Version 4.2 (current)<span class="caret"></span>
      </button>
      <ul class="dropdown-menu" role="menu">
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="master">
              
              Version 4.4 (upcoming)
            </a>
          </li>
        
          
          <li class="active">
          
            <a href="#" data-path="manual">
              
              Version 4.2 (current)
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v4.0">
              
              Version 4.0
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.6">
              
              Version 3.6
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.4">
              
              Version 3.4
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.2">
              
              Version 3.2
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.0">
              
              Version 3.0
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.6">
              
              Version 2.6
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.4">
              
              Version 2.4
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.2">
              
              Version 2.2
            </a>
          </li>
        
      </ul>
    </div>


<ul class="current"><li class="toctree-l1"><a class="reference internal" href="../../introduction.html">Introduction</a><ul><li class="toctree-l2"><a class="reference internal" href="../../tutorial/getting-started.html">Getting Started</a></li><li class="toctree-l2"><a class="reference external" href="https://docs.atlas.mongodb.com/getting-started/">Create an Atlas Free Tier Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/databases-and-collections.html">Databases and Collections</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/views.html">Views</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/materialized-views.html">On-Demand Materialized Views</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/capped-collections.html">Capped Collections</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/document.html">Documents</a></li><li class="toctree-l2"><a class="reference internal" href="../bson-types.html">BSON Types</a><ul><li class="toctree-l3"><a class="reference internal" href="../bson-type-comparison-order.html">Comparison/Sort Order</a></li><li class="toctree-l3"><a class="reference internal" href="../mongodb-extended-json.html">MongoDB Extended JSON (v2)</a></li><li class="toctree-l3"><a class="reference internal" href="../mongodb-extended-json-v1.html">MongoDB Extended JSON (v1)</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../installation.html">Installation</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/install-community.html">Install MongoDB Community Edition</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/install-on-linux.html">Install on Linux</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-red-hat.html">Install on Red Hat</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-red-hat-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-ubuntu.html">Install on Ubuntu</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-ubuntu-tarball.html">Install using .tgz Tarball</a></li><li class="toctree-l5"><a class="reference internal" href="../installation-ubuntu-community-troubleshooting.html">Troubleshoot Ubuntu Installation</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-debian.html">Install on Debian</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-debian-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-suse.html">Install on SUSE</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-suse-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-amazon.html">Install on Amazon</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-on-amazon-tarball.html">Install using .tgz Tarball</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-on-os-x.html">Install on macOS</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-os-x-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-on-windows.html">Install on Windows</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-on-windows-unattended.html">Install using msiexec.exe</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/install-enterprise.html">Install MongoDB Enterprise</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/install-enterprise-linux.html">Install on Linux</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-red-hat.html">Install on Red Hat</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-red-hat-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-ubuntu.html">Install on Ubuntu</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-ubuntu-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-debian.html">Install on Debian</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-debian-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-suse.html">Install on SUSE</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-suse-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-amazon.html">Install on Amazon</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-amazon-tarball.html">Install using .tgz Tarball</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-os-x.html">Install on macOS</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-windows.html">Install on Windows</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-on-windows-unattended.html">Install using msiexec.exe</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/install-mongodb-enterprise-with-docker.html">Install with Docker</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/upgrade-community-to-enterprise.html">Upgrade MongoDB Community to MongoDB Enterprise</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-to-enterprise-standalone.html">Upgrade to MongoDB Enterprise (Standalone)</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-to-enterprise-replica-set.html">Upgrade to MongoDB Enterprise (Replica Set)</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-to-enterprise-sharded-cluster.html">Upgrade to MongoDB Enterprise (Sharded Cluster)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/verify-mongodb-packages.html">Verify Integrity of MongoDB Packages</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../mongo.html">The <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a><ul><li class="toctree-l2"><a class="reference internal" href="../../tutorial/configure-mongo-shell.html">Configure the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/access-mongo-shell-help.html">Access the <code class="docutils literal"><span class="pre">mongo</span></code> Shell Help</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/write-scripts-for-the-mongo-shell.html">Write Scripts for the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/shell-types.html">Data Types in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../mongo-shell.html"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Quick Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../crud.html">MongoDB CRUD Operations</a><ul><li class="toctree-l2"><a class="reference internal" href="../../tutorial/insert-documents.html">Insert Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../insert-methods.html">Insert Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/query-documents.html">Query Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-embedded-documents.html">Query on Embedded/Nested Documents</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-arrays.html">Query an Array</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-array-of-documents.html">Query an Array of Embedded Documents</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/project-fields-from-query-results.html">Project Fields to Return from Query</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-for-null-fields.html">Query for Null or Missing Fields</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/iterate-a-cursor.html">Iterate a Cursor in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/update-documents.html">Update Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/update-documents-with-aggregation-pipeline.html">Updates with Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="../update-methods.html">Update Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/remove-documents.html">Delete Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../delete-methods.html">Delete Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/bulk-write-operations.html">Bulk Write Operations</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/retryable-writes.html">Retryable Writes</a></li><li class="toctree-l2"><a class="reference internal" href="../sql-comparison.html">SQL to MongoDB Mapping Chart</a></li><li class="toctree-l2"><a class="reference internal" href="../../text-search.html">Text Search</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/link-text-indexes.html">Text Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/text-search-operators.html">Text Search Operators</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/text-search-in-aggregation.html">Text Search in the Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="../text-search-languages.html">Text Search Languages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../geospatial-queries.html">Geospatial Queries</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/geospatial-tutorial.html">Find Restaurants with Geospatial Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../geojson.html">GeoJSON Objects</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../read-concern.html">Read Isolation (Read Concern)</a><ul><li class="toctree-l3"><a class="reference internal" href="../read-concern-local.html">Read Concern <code class="docutils literal"><span class="pre">&quot;local&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-available.html">Read Concern <code class="docutils literal"><span class="pre">&quot;available&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-majority.html">Read Concern <code class="docutils literal"><span class="pre">&quot;majority&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-linearizable.html">Read Concern <code class="docutils literal"><span class="pre">&quot;linearizable&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../read-concern-snapshot.html">Read Concern <code class="docutils literal"><span class="pre">&quot;snapshot&quot;</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../write-concern.html">Write Acknowledgement (Write Concern)</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/crud.html">MongoDB CRUD Concepts</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/write-operations-atomicity.html">Atomicity and Transactions</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/read-isolation-consistency-recency.html">Read Isolation, Consistency, and Recency</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/causal-consistency-read-write-concerns.html">Causal Consistency and Read and Write Concerns</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/distributed-queries.html">Distributed Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/perform-findAndModify-linearizable-reads.html">Linearizable Reads via <code class="docutils literal"><span class="pre">findAndModify</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../../core/query-plans.html">Query Plans</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/query-optimization.html">Query Optimization</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/evaluate-operation-performance.html">Evaluate Performance of Current Operations</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/optimize-query-performance-with-indexes-and-projections.html">Optimize Query Performance</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/write-performance.html">Write Operation Performance</a></li><li class="toctree-l4"><a class="reference internal" href="../explain-results.html">Explain Results</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/analyze-query-plan.html">Analyze Query Performance</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/tailable-cursors.html">Tailable Cursors</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../aggregation.html">Aggregation</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/aggregation-pipeline.html">Aggregation Pipeline</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/aggregation-pipeline-optimization.html">Aggregation Pipeline Optimization</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/aggregation-pipeline-limits.html">Aggregation Pipeline Limits</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/aggregation-pipeline-sharded-collections.html">Aggregation Pipeline and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/aggregation-zip-code-data-set.html">Example with ZIP Code Data</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/aggregation-with-user-preference-data.html">Example with User Preference Data</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/map-reduce.html">Map-Reduce</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/map-reduce-sharded-collections.html">Map-Reduce and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/map-reduce-concurrency.html">Map-Reduce Concurrency</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/map-reduce-examples.html">Map-Reduce Examples</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/perform-incremental-map-reduce.html">Perform Incremental Map-Reduce</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-map-function.html">Troubleshoot the Map Function</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-reduce-function.html">Troubleshoot the Reduce Function</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../aggregation.html">Aggregation Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../../meta/aggregation-quick-reference.html">Aggregation Pipeline Quick Reference</a></li><li class="toctree-l3"><a class="reference internal" href="../operator/aggregation/interface.html">Aggregation Commands</a></li><li class="toctree-l3"><a class="reference internal" href="../aggregation-commands-comparison.html">Aggregation Commands Comparison</a></li><li class="toctree-l3"><a class="reference internal" href="../aggregation-variables.html">Variables in Aggregation Expressions</a></li><li class="toctree-l3"><a class="reference internal" href="../sql-aggregation-comparison.html">SQL to Aggregation Mapping Chart</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../data-modeling.html">Data Models</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/data-modeling-introduction.html">Data Modeling Introduction</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/schema-validation.html">Schema Validation</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/data-models.html">Data Modeling Concepts</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/data-model-design.html">Data Model Design</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/data-model-operations.html">Operational Factors and Data Models</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../applications/data-models.html">Data Model Examples and Patterns</a><ul><li class="toctree-l3"><a class="reference internal" href="../../applications/data-models-relationships.html">Model Relationships Between Documents</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-embedded-one-to-one-relationships-between-documents.html">Model One-to-One Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-embedded-one-to-many-relationships-between-documents.html">Model One-to-Many Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-referenced-one-to-many-relationships-between-documents.html">Model One-to-Many Relationships with Document References</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../applications/data-models-tree-structures.html">Model Tree Structures</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-parent-references.html">Model Tree Structures with Parent References</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-child-references.html">Model Tree Structures with Child References</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-ancestors-array.html">Model Tree Structures with an Array of Ancestors</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-materialized-paths.html">Model Tree Structures with Materialized Paths</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-tree-structures-with-nested-sets.html">Model Tree Structures with Nested Sets</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../applications/data-models-applications.html">Model Specific Application Contexts</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-data-for-atomic-operations.html">Model Data for Atomic Operations</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-data-for-keyword-search.html">Model Data to Support Keyword Search</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-data-for-schema-versioning.html">Model Data for Schema Versioning</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-monetary-data.html">Model Monetary Data</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-time-data.html">Model Time Data</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/model-computed-data.html">Model Computed Data</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../data-models.html">Data Model Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../database-references.html">Database References</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../core/transactions.html">Transactions</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-in-applications.html">Drivers API</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-production-consideration.html">Production Considerations</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-sharded-clusters.html">Production Considerations (Sharded Clusters)</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/transactions-operations.html">Transactions and Operations</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../indexes.html">Indexes</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/index-single.html">Single Field Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-compound.html">Compound Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-multikey.html">Multikey Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/multikey-index-bounds.html">Multikey Index Bounds</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-text.html">Text Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/specify-language-for-text-index.html">Specify a Language for Text Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/avoid-text-index-name-limit.html">Specify Name for <code class="docutils literal"><span class="pre">text</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/control-results-of-text-search.html">Control Search Results with Weights</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/limit-number-of-items-scanned-for-text-search.html">Limit the Number of Entries Scanned</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-wildcard.html">Wildcard Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../index-wildcard-restrictions.html">Wildcard Index Restrictions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/2dsphere.html"><code class="docutils literal"><span class="pre">2dsphere</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-a-2dsphere-index.html">Query a <code class="docutils literal"><span class="pre">2dsphere</span></code> Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/2d.html"><code class="docutils literal"><span class="pre">2d</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-a-2d-index.html">Create a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-a-2d-index.html">Query a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/geospatial-indexes.html"><code class="docutils literal"><span class="pre">2d</span></code> Index Internals</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes.html">Calculate Distance Using Spherical Geometry</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/geohaystack.html"><code class="docutils literal"><span class="pre">geoHaystack</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-a-geohaystack-index.html">Create a Haystack Index</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/query-a-geohaystack-index.html">Query a Haystack Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-hashed.html">Hashed Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-properties.html">Index Properties</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/index-ttl.html">TTL Indexes</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/expire-data.html">Expire Data from Collections by Setting TTL</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-unique.html">Unique Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-partial.html">Partial Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-case-insensitive.html">Case Insensitive Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/index-sparse.html">Sparse Indexes</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-creation.html">Index Builds on Populated Collections</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-indexes-on-replica-sets.html">Build Indexes on Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/build-indexes-on-sharded-clusters.html">Build Indexes on Sharded Clusters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/index-intersection.html">Index Intersection</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/manage-indexes.html">Manage Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/measure-index-use.html">Measure Index Use</a></li><li class="toctree-l2"><a class="reference internal" href="../../applications/indexes.html">Indexing Strategies</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/create-indexes-to-support-queries.html">Create Indexes to Support Your Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sort-results-with-indexes.html">Use Indexes to Sort Query Results</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/ensure-indexes-fit-ram.html">Ensure Indexes Fit in RAM</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/create-queries-that-ensure-selectivity.html">Create Queries that Ensure Selectivity</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../indexes.html">Indexing Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../security.html">Security</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/security-checklist.html">Security Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/enable-authentication.html">Enable Access Control</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/authentication.html">Authentication</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/security-users.html">Users</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/create-users.html">Add Users</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/authentication-mechanisms.html">Authentication Mechanisms</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/security-scram.html">SCRAM</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/security-x.509.html">x.509</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/configure-x509-client-authentication.html">Use x.509 Certificates to Authenticate Clients</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/authentication-mechanisms-enterprise.html">Enterprise Authentication Mechanisms</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/kerberos.html">Kerberos Authentication</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/control-access-to-mongodb-with-kerberos-authentication.html">Configure MongoDB with Kerberos Authentication on Linux</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/control-access-to-mongodb-windows-with-kerberos-authentication.html">Configure MongoDB with Kerberos Authentication on Windows</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/troubleshoot-kerberos.html">Troubleshoot Kerberos Authentication</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/kerberos-auth-activedirectory-authz.html">Configure MongoDB with Kerberos Authentication and Active Directory Authorization</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../core/security-ldap.html">LDAP Proxy Authentication</a><ul><li class="toctree-l5"><a class="reference internal" href="../../tutorial/configure-ldap-sasl-activedirectory.html">Authenticate Using SASL and LDAP with ActiveDirectory</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/configure-ldap-sasl-openldap.html">Authenticate Using SASL and LDAP with OpenLDAP</a></li><li class="toctree-l5"><a class="reference internal" href="../../tutorial/authenticate-nativeldap-activedirectory.html">Authenticate and Authorize Users Using Active Directory via Native LDAP</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../../core/security-ldap-external.html">LDAP Authorization</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-internal-authentication.html">Internal/Membership Authentication</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/deploy-replica-set-with-keyfile-access-control.html">Deploy Replica Set With Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-replica-set.html">Update Replica Set to Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-replica-set-without-downtime.html">Update Replica Set to Keyfile Authentication (No Downtime)</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/rotate-key-replica-set.html">Rotate Keys for Replica Sets</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/deploy-sharded-cluster-with-keyfile-access-control.html">Deploy Sharded Cluster with Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.html">Update Sharded Cluster to Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.html">Update Sharded Cluster to Keyfile Authentication (No Downtime)</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/rotate-key-sharded-cluster.html">Rotate Keys for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html">Use x.509 Certificate for Membership Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/upgrade-keyfile-to-x509.html">Upgrade from Keyfile Authentication to x.509 Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/rotate-x509-membership-certificates.html">Rolling Update of x.509 Cluster Certificates that Contain New DN</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/authorization.html">Role-Based Access Control</a><ul><li class="toctree-l3"><a class="reference internal" href="../built-in-roles.html">Built-In Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-user-defined-roles.html">User-Defined Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-users-and-roles.html">Manage Users and Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/change-own-password-and-custom-data.html">Change Your Password and Custom Data</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/collection-level-access-control.html">Collection-Level Access Control</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-transport-encryption.html">TLS/SSL (Transport Encryption)</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-ssl.html">Configure <code class="docutils literal"><span class="pre">mongod</span></code> and <code class="docutils literal"><span class="pre">mongos</span></code> for TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-ssl-clients.html">TLS/SSL Configuration for Clients</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-cluster-to-ssl.html">Upgrade a Cluster to Use TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-fips.html">Configure MongoDB for FIPS</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-encryption-at-rest.html">Encryption at Rest</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-encryption.html">Configure Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/rotate-encryption-key.html">Rotate Encryption Keys</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-client-side-encryption.html">Client-Side Field Level Encryption</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/security-automatic-client-side-encryption.html">Automatic Client-Side Field Level Encryption</a><ul><li class="toctree-l4"><a class="reference internal" href="../security-client-side-automatic-json-schema.html">Automatic Encryption Rules</a></li><li class="toctree-l4"><a class="reference internal" href="../security-client-side-query-aggregation-support.html">Read/Write Support with Automatic Field Level Encryption</a></li><li class="toctree-l4"><a class="reference internal" href="../security-client-side-encryption-appendix.html">Appendix</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-explicit-client-side-encryption.html">Explicit (Manual) Client-Side Field Level Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/security-client-side-encryption-key-management.html">Master Key and Data Encryption Key Management</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/manage-client-side-encryption-data-keys.html">Manage Data Encryption Keys</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../security-client-side-encryption-limitations.html">Limitations</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/auditing.html">Auditing</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-auditing.html">Configure Auditing</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-audit-filters.html">Configure Audit Filters</a></li><li class="toctree-l3"><a class="reference internal" href="../audit-message.html">System Event Audit Messages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/security-hardening.html">Network and Configuration Hardening</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/security-mongodb-configuration.html">IP Binding</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-linux-iptables-firewall.html">Configure Linux <code class="docutils literal"><span class="pre">iptables</span></code> Firewall for MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-windows-netsh-firewall.html">Configure Windows <code class="docutils literal"><span class="pre">netsh</span></code> Firewall for MongoDB</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/implement-field-level-redaction.html">Implement Field Level Redaction</a></li><li class="toctree-l2"><a class="reference internal" href="../security.html">Security Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../system-roles-collection.html"><code class="docutils literal"><span class="pre">system.roles</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="../system-users-collection.html"><code class="docutils literal"><span class="pre">system.users</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="../resource-document.html">Resource Document</a></li><li class="toctree-l3"><a class="reference internal" href="../privilege-actions.html">Privilege Actions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/create-a-vulnerability-report.html">Create a Vulnerability Report</a></li><li class="toctree-l2"><a class="reference internal" href="../../appendix/security.html">Appendix</a><ul><li class="toctree-l3"><a class="reference internal" href="../../appendix/security/appendixA-openssl-ca.html">Appendix A - OpenSSL CA Certificate for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="../../appendix/security/appendixB-openssl-server.html">Appendix B - OpenSSL Server Certificates for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="../../appendix/security/appendixC-openssl-client.html">Appendix C - OpenSSL Client Certificates for Testing</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../changeStreams.html">Change Streams</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/change-streams-production-recommendations.html">Change Streams Production Recommendations</a></li><li class="toctree-l2"><a class="reference internal" href="../change-events.html">Change Events</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../replication.html">Replication</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-members.html">Replica Set Members</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-primary.html">Replica Set Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-secondary.html">Replica Set Secondary Members</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/replica-set-priority-0-member.html">Priority 0 Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/replica-set-hidden-member.html">Hidden Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/replica-set-delayed-member.html">Delayed Replica Set Members</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-arbiter.html">Replica Set Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-oplog.html">Replica Set Oplog</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-sync.html">Replica Set Data Synchronization</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-architectures.html">Replica Set Deployment Architectures</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-architecture-three-members.html">Three Member Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-architecture-geographically-distributed.html">Replica Sets Distributed Across Two or More Data Centers</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/replica-set-high-availability.html">Replica Set High Availability</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-elections.html">Replica Set Elections</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-rollbacks.html">Rollbacks During Replica Set Failover</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../applications/replication.html">Replica Set Read and Write Semantics</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/replica-set-write-concern.html">Write Concern for Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/read-preference.html">Read Preference</a><ul><li class="toctree-l4"><a class="reference internal" href="../../core/read-preference-tags.html">Tag Sets</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/read-preference-staleness.html">maxStalenessSeconds</a></li><li class="toctree-l4"><a class="reference internal" href="../../core/read-preference-use-cases.html">Read Preference Use Cases</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/read-preference-mechanics.html">Server Selection Algorithm</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/replica-set-deployment.html">Replica Set Deployment Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/deploy-replica-set.html">Deploy a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/deploy-replica-set-for-testing.html">Deploy a Replica Set for Testing and Development</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/deploy-geographically-distributed-replica-set.html">Deploy a Geographically Redundant Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/add-replica-set-arbiter.html">Add an Arbiter to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-standalone-to-replica-set.html">Convert a Standalone to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/expand-replica-set.html">Add Members to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/remove-replica-set-member.html">Remove Members from Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/replace-replica-set-member.html">Replace a Replica Set Member</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/replica-set-member-configuration.html">Member Configuration Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/adjust-replica-set-member-priority.html">Adjust Priority for Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-secondary-only-replica-set-member.html">Prevent Secondary from Becoming Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-a-hidden-replica-set-member.html">Configure a Hidden Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-a-delayed-replica-set-member.html">Configure a Delayed Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-a-non-voting-replica-set-member.html">Configure Non-Voting Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-secondary-into-arbiter.html">Convert a Secondary to an Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/replica-set-maintenance.html">Replica Set Maintenance Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/change-oplog-size.html">Change the Size of the Oplog</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/perform-maintence-on-replica-set-members.html">Perform Maintenance on Replica Set Members</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/force-member-to-be-primary.html">Force a Member to Become Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/resync-replica-set-member.html">Resync a Member of a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-replica-set-tag-sets.html">Configure Replica Set Tag Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/reconfigure-replica-set-with-unavailable-members.html">Reconfigure a Replica Set with Unavailable Members</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-chained-replication.html">Manage Chained Replication</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/change-hostnames-in-a-replica-set.html">Change Hostnames in a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/configure-replica-set-secondary-sync-target.html">Configure a Secondary’s Sync Target</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../replication.html">Replication Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../replica-configuration.html">Replica Set Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../replica-set-protocol-versions.html">Replica Set Protocol Version</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-replica-sets.html">Troubleshoot Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../local-database.html">The <code class="docutils literal"><span class="pre">local</span></code> Database</a></li><li class="toctree-l3"><a class="reference internal" href="../replica-states.html">Replica Set Member States</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../sharding.html">Sharding</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/sharded-cluster-components.html">Sharded Cluster Components</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-shards.html">Shards</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-config-servers.html">Config Servers (metadata)</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-query-router.html">Router (mongos)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/sharding-shard-key.html">Shard Keys</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/hashed-sharding.html">Hashed Sharding</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/ranged-sharding.html">Ranged Sharding</a></li><li class="toctree-l2"><a class="reference internal" href="../../tutorial/deploy-shard-cluster.html">Deploy a Sharded Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="../../core/zone-sharding.html">Zones</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-segmenting-data-by-location.html">Segmenting Data by Location</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-tiered-hardware-for-varying-slas.html">Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-segmenting-shards.html">Segmenting Data by Application or Customer</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/sharding-high-availability-writes.html">Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/sharding-data-partitioning.html">Data Partitioning with Chunks</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/create-chunks-in-sharded-cluster.html">Create Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/split-chunks-in-sharded-cluster.html">Split Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/merge-chunks-in-sharded-cluster.html">Merge Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/modify-chunk-size-in-sharded-cluster.html">Modify Chunk Size in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/sharding-balancer-administration.html">Balancer</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-sharded-cluster-balancer.html">Manage Sharded Cluster Balancer</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/migrate-chunks-in-sharded-cluster.html">Migrate Chunks in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/sharded-cluster-administration.html">Administration</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/sharded-cluster-config-servers.html">Config Server Administration</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/replace-config-server.html">Replace a Config Server</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/view-sharded-cluster-configuration.html">View Cluster Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/restart-sharded-cluster.html">Restart a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/migrate-sharded-cluster-to-new-hardware.html">Migrate a Sharded Cluster to Different Hardware</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/add-shards-to-shard-cluster.html">Add Shards to a Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/remove-shards-from-cluster.html">Remove Shards from an Existing Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/clear-jumbo-flag.html">Clear <code class="docutils literal"><span class="pre">jumbo</span></code> Flag</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/backup-sharded-cluster-metadata.html">Back Up Cluster Metadata</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-sharded-cluster-to-replica-set.html">Convert Sharded Cluster to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-replica-set-to-replicated-shard-cluster.html">Convert a Replica Set to a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-shard-standalone-to-shard-replica-set.html">Convert a Shard Standalone to a Shard Replica Set</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../sharding.html">Sharding Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/sharded-cluster-requirements.html">Operational Restrictions</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-sharded-clusters.html">Troubleshoot Sharded Clusters</a></li><li class="toctree-l3"><a class="reference internal" href="../config-database.html">Config Database</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../administration.html">Administration</a><ul><li class="toctree-l2"><a class="reference internal" href="../../administration/production-notes.html">Production Notes</a></li><li class="toctree-l2"><a class="reference internal" href="../../administration/production-checklist-operations.html">Operations Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../../administration/production-checklist-development.html">Development Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../../administration/analyzing-mongodb-performance.html">Performance</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-the-database-profiler.html">Database Profiler</a><ul><li class="toctree-l4"><a class="reference internal" href="../database-profiler.html">Database Profiler Output</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/transparent-huge-pages.html">Disable Transparent Huge Pages (THP)</a></li><li class="toctree-l3"><a class="reference internal" href="../ulimit.html">UNIX <code class="docutils literal"><span class="pre">ulimit</span></code> Settings</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/configuration-and-maintenance.html">Configuration and Maintenance</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/configuration.html">Run-time Database Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/upgrade-revision.html">Upgrade to the Latest Revision of MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-mongodb-processes.html">Manage <code class="docutils literal"><span class="pre">mongod</span></code> Processes</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/terminate-running-operations.html">Terminate Running Operations</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/rotate-log-files.html">Rotate Log Files</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../data-center-awareness.html">Data Center Awareness</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/workload-isolation.html">Workload Isolation in MongoDB Deployments</a></li><li class="toctree-l3"><a class="reference internal" href="../../core/zone-sharding.html">Zones</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-segmenting-data-by-location.html">Segmenting Data by Location</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-tiered-hardware-for-varying-slas.html">Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-segmenting-shards.html">Segmenting Data by Application or Customer</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/sharding-high-availability-writes.html">Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/backups.html">MongoDB Backup Methods</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/backup-with-filesystem-snapshots.html">Back Up and Restore with Filesystem Snapshots</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/backup-and-restore-tools.html">Back Up and Restore with MongoDB Tools</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/restore-replica-set-from-backup.html">Restore a Replica Set from MongoDB Backups</a></li><li class="toctree-l3"><a class="reference internal" href="../../administration/backup-sharded-clusters.html">Backup and Restore Sharded Clusters</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/backup-sharded-cluster-with-filesystem-snapshots.html">Back Up a Sharded Cluster with File System Snapshots</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/backup-sharded-cluster-with-database-dumps.html">Back Up a Sharded Cluster with Database Dumps</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/schedule-backup-window-for-sharded-clusters.html">Schedule Backup Window for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/restore-sharded-cluster.html">Restore a Sharded Cluster</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/recover-data-following-unexpected-shutdown.html">Recover a Standalone after an Unexpected Shutdown</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../administration/monitoring.html">Monitoring for MongoDB</a><ul><li class="toctree-l3"><a class="reference internal" href="../../administration/free-monitoring.html">Free Monitoring</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/monitor-with-snmp.html">Monitor MongoDB With SNMP on Linux</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/monitor-with-snmp-on-windows.html">Monitor MongoDB Windows with SNMP</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/troubleshoot-snmp.html">Troubleshoot SNMP</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../storage.html">Storage</a><ul><li class="toctree-l2"><a class="reference internal" href="../../core/storage-engines.html">Storage Engines</a><ul><li class="toctree-l3"><a class="reference internal" href="../../core/wiredtiger.html">WiredTiger Storage Engine</a><ul><li class="toctree-l4"><a class="reference internal" href="../../tutorial/change-standalone-wiredtiger.html">Change Standalone to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/change-replica-set-wiredtiger.html">Change Replica Set to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="../../tutorial/change-sharded-cluster-wiredtiger.html">Change Sharded Cluster to WiredTiger</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../core/inmemory.html">In-Memory Storage Engine</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/journaling.html">Journaling</a><ul><li class="toctree-l3"><a class="reference internal" href="../../tutorial/manage-journaling.html">Manage Journaling</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../core/gridfs.html">GridFS</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/storage.html">FAQ: MongoDB Storage</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../faq.html">Frequently Asked Questions</a><ul><li class="toctree-l2"><a class="reference internal" href="../../faq/fundamentals.html">FAQ: MongoDB Fundamentals</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/indexes.html">FAQ: Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/concurrency.html">FAQ: Concurrency</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/sharding.html">FAQ: Sharding with MongoDB</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/replica-sets.html">FAQ: Replication and Replica Sets</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/storage.html">FAQ: MongoDB Storage</a></li><li class="toctree-l2"><a class="reference internal" href="../../faq/diagnostics.html">FAQ: MongoDB Diagnostics</a></li></ul></li><li class="toctree-l1 current"><a class="reference internal" href="../../reference.html">Reference</a><ul class="current"><li class="toctree-l2"><a class="reference internal" href="../operator.html">Operators</a><ul><li class="toctree-l3"><a class="reference internal" href="../operator/query.html">Query and Projection Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/query-comparison.html">Comparison Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/eq.html">$eq</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/gt.html">$gt</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/gte.html">$gte</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/in.html">$in</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/lt.html">$lt</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/lte.html">$lte</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/ne.html">$ne</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/nin.html">$nin</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-logical.html">Logical Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/and.html">$and</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/not.html">$not</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/nor.html">$nor</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/or.html">$or</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-element.html">Element Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/exists.html">$exists</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/type.html">$type</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-evaluation.html">Evaluation Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/expr.html">$expr</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/jsonSchema.html">$jsonSchema</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/mod.html">$mod</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/regex.html">$regex</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/text.html">$text</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/where.html">$where</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-geospatial.html">Geospatial Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/geoIntersects.html">$geoIntersects</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/geoWithin.html">$geoWithin</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/near.html">$near</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/nearSphere.html">$nearSphere</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/box.html">$box</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/center.html">$center</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/centerSphere.html">$centerSphere</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/geometry.html">$geometry</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/maxDistance.html">$maxDistance</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/minDistance.html">$minDistance</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/polygon.html">$polygon</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/uniqueDocs.html">$uniqueDocs</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-array.html">Array Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/all.html">$all</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/elemMatch.html">$elemMatch (query)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/size.html">$size</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query-bitwise.html">Bitwise Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAllClear.html">$bitsAllClear</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAllSet.html">$bitsAllSet</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAnyClear.html">$bitsAnyClear</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/query/bitsAnySet.html">$bitsAnySet</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/query/comment.html">$comment</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/projection.html">Projection Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/projection/positional.html">$ (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/projection/elemMatch.html">$elemMatch (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/projection/meta.html">$meta</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/projection/slice.html">$slice (projection)</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/update.html">Update Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/update-field.html">Field Update Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/update/currentDate.html">$currentDate</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/inc.html">$inc</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/min.html">$min</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/max.html">$max</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/mul.html">$mul</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/rename.html">$rename</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/set.html">$set</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/setOnInsert.html">$setOnInsert</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/unset.html">$unset</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/update-array.html">Array Update Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/update/positional.html">$ (update)</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/positional-all.html">$[]</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/positional-filtered.html">$[&lt;identifier&gt;]</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/addToSet.html">$addToSet</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/pop.html">$pop</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/pull.html">$pull</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/push.html">$push</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/pullAll.html">$pullAll</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/each.html">$each</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/position.html">$position</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/slice.html">$slice</a></li><li class="toctree-l5"><a class="reference internal" href="../operator/update/sort.html">$sort</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../operator/update-bitwise.html">Bitwise Update Operator</a><ul><li class="toctree-l5"><a class="reference internal" href="../operator/update/bit.html">$bit</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/aggregation-pipeline.html">Aggregation Pipeline Stages</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/addFields.html">$addFields (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/bucket.html">$bucket (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/bucketAuto.html">$bucketAuto (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/collStats.html">$collStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/count.html">$count (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/currentOp.html">$currentOp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/facet.html">$facet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/geoNear.html">$geoNear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/graphLookup.html">$graphLookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/group.html">$group (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexStats.html">$indexStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/limit.html">$limit (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/listLocalSessions.html">$listLocalSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/listSessions.html">$listSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/lookup.html">$lookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/match.html">$match (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/merge.html">$merge (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/out.html">$out (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/planCacheStats.html">$planCacheStats</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/project.html">$project (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/redact.html">$redact (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/replaceRoot.html">$replaceRoot (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/replaceWith.html">$replaceWith (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sample.html">$sample (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/set.html">$set (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/skip.html">$skip (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sort.html">$sort (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sortByCount.html">$sortByCount (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/unset.html">$unset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/unwind.html">$unwind (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/aggregation.html">Aggregation Pipeline Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/abs.html">$abs (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/acos.html">$acos (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/acosh.html">$acosh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/add.html">$add (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/addToSet.html">$addToSet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/allElementsTrue.html">$allElementsTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/and.html">$and (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/anyElementTrue.html">$anyElementTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/arrayElemAt.html">$arrayElemAt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/arrayToObject.html">$arrayToObject (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/asin.html">$asin (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/asinh.html">$asinh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/atan.html">$atan (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/atan2.html">$atan2 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/atanh.html">$atanh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/avg.html">$avg (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ceil.html">$ceil (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/cmp.html">$cmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/concat.html">$concat (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/concatArrays.html">$concatArrays (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/cond.html">$cond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/convert.html">$convert (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/cos.html">$cos (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateFromParts.html">$dateFromParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateToParts.html">$dateToParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateFromString.html">$dateFromString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dateToString.html">$dateToString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dayOfMonth.html">$dayOfMonth (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dayOfWeek.html">$dayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/dayOfYear.html">$dayOfYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/degreesToRadians.html">$degreesToRadians (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/divide.html">$divide (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/eq.html">$eq (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/exp.html">$exp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/filter.html">$filter (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/first.html">$first (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/floor.html">$floor (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/gt.html">$gt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/gte.html">$gte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/hour.html">$hour (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ifNull.html">$ifNull (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/in.html">$in (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexOfArray.html">$indexOfArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexOfBytes.html">$indexOfBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/indexOfCP.html">$indexOfCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isArray.html">$isArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isoDayOfWeek.html">$isoDayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isoWeek.html">$isoWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/isoWeekYear.html">$isoWeekYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/last.html">$last (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/let.html">$let (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/literal.html">$literal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ln.html">$ln (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/log.html">$log (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/log10.html">$log10 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/lt.html">$lt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/lte.html">$lte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ltrim.html">$ltrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/map.html">$map (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/max.html">$max (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/mergeObjects.html">$mergeObjects (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/meta.html">$meta (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/min.html">$min (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/millisecond.html">$millisecond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/minute.html">$minute (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/mod.html">$mod (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/month.html">$month (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/multiply.html">$multiply (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/ne.html">$ne (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/not.html">$not (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/objectToArray.html">$objectToArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/or.html">$or (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/pow.html">$pow (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/push.html">$push (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/radiansToDegrees.html">$radiansToDegrees (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/range.html">$range (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/reduce.html">$reduce (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/regexFind.html">$regexFind (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/regexFindAll.html">$regexFindAll (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/regexMatch.html">$regexMatch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/reverseArray.html">$reverseArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/round.html">$round (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/rtrim.html">$rtrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/second.html">$second (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setDifference.html">$setDifference (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setEquals.html">$setEquals (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setIntersection.html">$setIntersection (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setIsSubset.html">$setIsSubset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/setUnion.html">$setUnion (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/size.html">$size (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sin.html">$sin (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/slice.html">$slice (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/split.html">$split (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sqrt.html">$sqrt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/stdDevPop.html">$stdDevPop (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/stdDevSamp.html">$stdDevSamp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/strcasecmp.html">$strcasecmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/strLenBytes.html">$strLenBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/strLenCP.html">$strLenCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/substr.html">$substr (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/substrBytes.html">$substrBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/substrCP.html">$substrCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/subtract.html">$subtract (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/sum.html">$sum (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/switch.html">$switch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/tan.html">$tan (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toBool.html">$toBool (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toDate.html">$toDate (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toDecimal.html">$toDecimal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toDouble.html">$toDouble(aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toInt.html">$toInt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toLong.html">$toLong (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toObjectId.html">$toObjectId (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toString.html">$toString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toLower.html">$toLower (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/toUpper.html">$toUpper (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/trim.html">$trim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/trunc.html">$trunc (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/type.html">$type (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/week.html">$week (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/year.html">$year (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/aggregation/zip.html">$zip (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../operator/query-modifier.html">Query Modifiers</a><ul><li class="toctree-l4"><a class="reference internal" href="../operator/meta/comment.html">$comment</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/explain.html">$explain</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/hint.html">$hint</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/max.html">$max</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/maxTimeMS.html">$maxTimeMS</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/min.html">$min</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/orderby.html">$orderby</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/query.html">$query</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/returnKey.html">$returnKey</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/showDiskLoc.html">$showDiskLoc</a></li><li class="toctree-l4"><a class="reference internal" href="../operator/meta/natural.html">$natural</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../command.html">Database Commands</a><ul><li class="toctree-l3"><a class="reference internal" href="../command/nav-aggregation.html">Aggregation Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/aggregate.html">aggregate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/count.html">count</a></li><li class="toctree-l4"><a class="reference internal" href="../command/distinct.html">distinct</a></li><li class="toctree-l4"><a class="reference internal" href="../command/mapReduce.html">mapReduce</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-geospatial.html">Geospatial Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/geoSearch.html">geoSearch</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-crud.html">Query and Write Operation Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/delete.html">delete</a></li><li class="toctree-l4"><a class="reference internal" href="../command/find.html">find</a></li><li class="toctree-l4"><a class="reference internal" href="../command/findAndModify.html">findAndModify</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getLastError.html">getLastError</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getMore.html">getMore</a></li><li class="toctree-l4"><a class="reference internal" href="../command/insert.html">insert</a></li><li class="toctree-l4"><a class="reference internal" href="../command/resetError.html">resetError</a></li><li class="toctree-l4"><a class="reference internal" href="../command/update.html">update</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-plan-cache.html">Query Plan Cache Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/planCacheClear.html">planCacheClear</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheClearFilters.html">planCacheClearFilters</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheListFilters.html">planCacheListFilters</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheListPlans.html">planCacheListPlans</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheListQueryShapes.html">planCacheListQueryShapes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/planCacheSetFilter.html">planCacheSetFilter</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-authentication.html">Authentication Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/authenticate.html">authenticate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getnonce.html">getnonce</a></li><li class="toctree-l4"><a class="reference internal" href="../command/logout.html">logout</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-user-management.html">User Management Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/createUser.html">createUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropAllUsersFromDatabase.html">dropAllUsersFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropUser.html">dropUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/grantRolesToUser.html">grantRolesToUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/revokeRolesFromUser.html">revokeRolesFromUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/updateUser.html">updateUser</a></li><li class="toctree-l4"><a class="reference internal" href="../command/usersInfo.html">usersInfo</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-role-management.html">Role Management Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/createRole.html">createRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropRole.html">dropRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropAllRolesFromDatabase.html">dropAllRolesFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../command/grantPrivilegesToRole.html">grantPrivilegesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/grantRolesToRole.html">grantRolesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/invalidateUserCache.html">invalidateUserCache</a></li><li class="toctree-l4"><a class="reference internal" href="../command/revokePrivilegesFromRole.html">revokePrivilegesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/revokeRolesFromRole.html">revokeRolesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="../command/rolesInfo.html">rolesInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/updateRole.html">updateRole</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-replication.html">Replication Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/applyOps.html">applyOps</a></li><li class="toctree-l4"><a class="reference internal" href="../command/isMaster.html">isMaster</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetAbortPrimaryCatchUp.html">replSetAbortPrimaryCatchUp</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetFreeze.html">replSetFreeze</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetGetConfig.html">replSetGetConfig</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetGetStatus.html">replSetGetStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetInitiate.html">replSetInitiate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetMaintenance.html">replSetMaintenance</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetReconfig.html">replSetReconfig</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetResizeOplog.html">replSetResizeOplog</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetStepDown.html">replSetStepDown</a></li><li class="toctree-l4"><a class="reference internal" href="../command/replSetSyncFrom.html">replSetSyncFrom</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-sharding.html">Sharding Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/addShard.html">addShard</a></li><li class="toctree-l4"><a class="reference internal" href="../command/addShardToZone.html">addShardToZone</a></li><li class="toctree-l4"><a class="reference internal" href="../command/balancerStart.html">balancerStart</a></li><li class="toctree-l4"><a class="reference internal" href="../command/balancerStatus.html">balancerStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/balancerStop.html">balancerStop</a></li><li class="toctree-l4"><a class="reference internal" href="../command/checkShardingIndex.html">checkShardingIndex</a></li><li class="toctree-l4"><a class="reference internal" href="../command/clearJumboFlag.html">clearJumboFlag</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cleanupOrphaned.html">cleanupOrphaned</a></li><li class="toctree-l4"><a class="reference internal" href="../command/enableSharding.html">enableSharding</a></li><li class="toctree-l4"><a class="reference internal" href="../command/flushRouterConfig.html">flushRouterConfig</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getShardMap.html">getShardMap</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getShardVersion.html">getShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../command/isdbgrid.html">isdbgrid</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listShards.html">listShards</a></li><li class="toctree-l4"><a class="reference internal" href="../command/medianKey.html">medianKey</a></li><li class="toctree-l4"><a class="reference internal" href="../command/moveChunk.html">moveChunk</a></li><li class="toctree-l4"><a class="reference internal" href="../command/movePrimary.html">movePrimary</a></li><li class="toctree-l4"><a class="reference internal" href="../command/mergeChunks.html">mergeChunks</a></li><li class="toctree-l4"><a class="reference internal" href="../command/removeShard.html">removeShard</a></li><li class="toctree-l4"><a class="reference internal" href="../command/removeShardFromZone.html">removeShardFromZone</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setShardVersion.html">setShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shardCollection.html">shardCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shardingState.html">shardingState</a></li><li class="toctree-l4"><a class="reference internal" href="../command/split.html">split</a></li><li class="toctree-l4"><a class="reference internal" href="../command/splitChunk.html">splitChunk</a></li><li class="toctree-l4"><a class="reference internal" href="../command/splitVector.html">splitVector</a></li><li class="toctree-l4"><a class="reference internal" href="../command/unsetSharding.html">unsetSharding</a></li><li class="toctree-l4"><a class="reference internal" href="../command/updateZoneKeyRange.html">updateZoneKeyRange</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-sessions.html">Sessions Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/abortTransaction.html">abortTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="../command/commitTransaction.html">commitTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="../command/endSessions.html">endSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killAllSessions.html">killAllSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killAllSessionsByPattern.html">killAllSessionsByPattern</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killSessions.html">killSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/refreshSessions.html">refreshSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/startSession.html">startSession</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-administration.html">Administration Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/clean.html">clean</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cloneCollection.html">cloneCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cloneCollectionAsCapped.html">cloneCollectionAsCapped</a></li><li class="toctree-l4"><a class="reference internal" href="../command/collMod.html">collMod</a></li><li class="toctree-l4"><a class="reference internal" href="../command/compact.html">compact</a></li><li class="toctree-l4"><a class="reference internal" href="../command/connPoolSync.html">connPoolSync</a></li><li class="toctree-l4"><a class="reference internal" href="../command/convertToCapped.html">convertToCapped</a></li><li class="toctree-l4"><a class="reference internal" href="../command/create.html">create</a></li><li class="toctree-l4"><a class="reference internal" href="../command/createIndexes.html">createIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/currentOp.html">currentOp</a></li><li class="toctree-l4"><a class="reference internal" href="../command/drop.html">drop</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropDatabase.html">dropDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropConnections.html">dropConnections</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dropIndexes.html">dropIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/filemd5.html">filemd5</a></li><li class="toctree-l4"><a class="reference internal" href="../command/fsync.html">fsync</a></li><li class="toctree-l4"><a class="reference internal" href="../command/fsyncUnlock.html">fsyncUnlock</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getParameter.html">getParameter</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killCursors.html">killCursors</a></li><li class="toctree-l4"><a class="reference internal" href="../command/killOp.html">killOp</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listCollections.html">listCollections</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listDatabases.html">listDatabases</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listIndexes.html">listIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../command/logRotate.html">logRotate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/reIndex.html">reIndex</a></li><li class="toctree-l4"><a class="reference internal" href="../command/renameCollection.html">renameCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setFeatureCompatibilityVersion.html">setFeatureCompatibilityVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setParameter.html">setParameter</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shutdown.html">shutdown</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-diagnostic.html">Diagnostic Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/availableQueryOptions.html">availableQueryOptions</a></li><li class="toctree-l4"><a class="reference internal" href="../command/buildInfo.html">buildInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/collStats.html">collStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/connPoolStats.html">connPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/connectionStatus.html">connectionStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/cursorInfo.html">cursorInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dataSize.html">dataSize</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dbHash.html">dbHash</a></li><li class="toctree-l4"><a class="reference internal" href="../command/dbStats.html">dbStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/diagLogging.html">diagLogging</a></li><li class="toctree-l4"><a class="reference internal" href="../command/driverOIDTest.html">driverOIDTest</a></li><li class="toctree-l4"><a class="reference internal" href="../command/explain.html">explain</a></li><li class="toctree-l4"><a class="reference internal" href="../command/features.html">features</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getCmdLineOpts.html">getCmdLineOpts</a></li><li class="toctree-l4"><a class="reference internal" href="../command/getLog.html">getLog</a></li><li class="toctree-l4"><a class="reference internal" href="../command/hostInfo.html">hostInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../command/isSelf.html">isSelf</a></li><li class="toctree-l4"><a class="reference internal" href="../command/listCommands.html">listCommands</a></li><li class="toctree-l4"><a class="reference internal" href="../command/netstat.html">netstat</a></li><li class="toctree-l4"><a class="reference internal" href="../command/ping.html">ping</a></li><li class="toctree-l4"><a class="reference internal" href="../command/profile.html">profile</a></li><li class="toctree-l4"><a class="reference internal" href="../command/serverStatus.html">serverStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/shardConnPoolStats.html">shardConnPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="../command/top.html">top</a></li><li class="toctree-l4"><a class="reference internal" href="../command/validate.html">validate</a></li><li class="toctree-l4"><a class="reference internal" href="../command/whatsmyuri.html">whatsmyuri</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-free-monitoring.html">Free Monitoring Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/getFreeMonitoringStatus.html">getFreeMonitoringStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../command/setFreeMonitoring.html">setFreeMonitoring</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../command/nav-auditing.html">System Events Auditing Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../command/logApplicationMessage.html">logApplicationMessage</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../method.html"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods</a><ul><li class="toctree-l3"><a class="reference internal" href="../method/js-collection.html">Collection Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.aggregate.html">db.collection.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.bulkWrite.html">db.collection.bulkWrite()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.copyTo.html">db.collection.copyTo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.count.html">db.collection.count()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.countDocuments.html">db.collection.countDocuments()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.estimatedDocumentCount.html">db.collection.estimatedDocumentCount()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.createIndex.html">db.collection.createIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.createIndexes.html">db.collection.createIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.dataSize.html">db.collection.dataSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.deleteOne.html">db.collection.deleteOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.deleteMany.html">db.collection.deleteMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.distinct.html">db.collection.distinct()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.drop.html">db.collection.drop()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.dropIndex.html">db.collection.dropIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.dropIndexes.html">db.collection.dropIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.ensureIndex.html">db.collection.ensureIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.explain.html">db.collection.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.find.html">db.collection.find()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findAndModify.html">db.collection.findAndModify()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOne.html">db.collection.findOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOneAndDelete.html">db.collection.findOneAndDelete()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOneAndReplace.html">db.collection.findOneAndReplace()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.findOneAndUpdate.html">db.collection.findOneAndUpdate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getIndexes.html">db.collection.getIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getShardDistribution.html">db.collection.getShardDistribution()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getShardVersion.html">db.collection.getShardVersion()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.insert.html">db.collection.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.insertOne.html">db.collection.insertOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.insertMany.html">db.collection.insertMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.isCapped.html">db.collection.isCapped()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.latencyStats.html">db.collection.latencyStats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.mapReduce.html">db.collection.mapReduce()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.reIndex.html">db.collection.reIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.remove.html">db.collection.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.renameCollection.html">db.collection.renameCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.replaceOne.html">db.collection.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.save.html">db.collection.save()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.stats.html">db.collection.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.storageSize.html">db.collection.storageSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.totalIndexSize.html">db.collection.totalIndexSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.totalSize.html">db.collection.totalSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.update.html">db.collection.update()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.updateOne.html">db.collection.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.updateMany.html">db.collection.updateMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.watch.html">db.collection.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.validate.html">db.collection.validate()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-cursor.html">Cursor Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/cursor.addOption.html">cursor.addOption()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.allowPartialResults.html">cursor.allowPartialResults()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.batchSize.html">cursor.batchSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.close.html">cursor.close()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.isClosed.html">cursor.isClosed()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.collation.html">cursor.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.comment.html">cursor.comment()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.count.html">cursor.count()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.explain.html">cursor.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.forEach.html">cursor.forEach()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.hasNext.html">cursor.hasNext()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.hint.html">cursor.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.isExhausted.html">cursor.isExhausted()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.itcount.html">cursor.itcount()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.limit.html">cursor.limit()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.map.html">cursor.map()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.max.html">cursor.max()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.maxTimeMS.html">cursor.maxTimeMS()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.min.html">cursor.min()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.next.html">cursor.next()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.noCursorTimeout.html">cursor.noCursorTimeout()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.objsLeftInBatch.html">cursor.objsLeftInBatch()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.pretty.html">cursor.pretty()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.readConcern.html">cursor.readConcern()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.readPref.html">cursor.readPref()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.returnKey.html">cursor.returnKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.showRecordId.html">cursor.showRecordId()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.size.html">cursor.size()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.skip.html">cursor.skip()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.sort.html">cursor.sort()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.tailable.html">cursor.tailable()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cursor.toArray.html">cursor.toArray()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-database.html">Database Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.adminCommand.html">db.adminCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.aggregate.html">db.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.cloneCollection.html">db.cloneCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.cloneDatabase.html">db.cloneDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.commandHelp.html">db.commandHelp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.copyDatabase.html">db.copyDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.createCollection.html">db.createCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.createView.html">db.createView()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.currentOp.html">db.currentOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropDatabase.html">db.dropDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.eval.html">db.eval()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.fsyncLock.html">db.fsyncLock()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.fsyncUnlock.html">db.fsyncUnlock()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getCollection.html">db.getCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getCollectionInfos.html">db.getCollectionInfos()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getCollectionNames.html">db.getCollectionNames()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getLastError.html">db.getLastError()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getLastErrorObj.html">db.getLastErrorObj()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getLogComponents.html">db.getLogComponents()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getMongo.html">db.getMongo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getName.html">db.getName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getProfilingLevel.html">db.getProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getProfilingStatus.html">db.getProfilingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getReplicationInfo.html">db.getReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getSiblingDB.html">db.getSiblingDB()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.help.html">db.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.hostInfo.html">db.hostInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.isMaster.html">db.isMaster()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.killOp.html">db.killOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.listCommands.html">db.listCommands()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.logout.html">db.logout()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printCollectionStats.html">db.printCollectionStats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printReplicationInfo.html">db.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printShardingStatus.html">db.printShardingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.printSlaveReplicationInfo.html">db.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.resetError.html">db.resetError()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.runCommand.html">db.runCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.serverBuildInfo.html">db.serverBuildInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.serverCmdLineOpts.html">db.serverCmdLineOpts()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.serverStatus.html">db.serverStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.setLogLevel.html">db.setLogLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.setProfilingLevel.html">db.setProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.shutdownServer.html">db.shutdownServer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.stats.html">db.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.version.html">db.version()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.watch.html">db.watch()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-plan-cache.html">Query Plan Cache Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.getPlanCache.html">db.collection.getPlanCache()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.clear.html">PlanCache.clear()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.clearPlansByQuery.html">PlanCache.clearPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.getPlansByQuery.html">PlanCache.getPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.help.html">PlanCache.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/PlanCache.listQueryShapes.html">PlanCache.listQueryShapes()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-bulk.html">Bulk Operation Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.initializeOrderedBulkOp.html">db.collection.initializeOrderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.collection.initializeUnorderedBulkOp.html">db.collection.initializeUnorderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.html">Bulk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.execute.html">Bulk.execute()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.html">Bulk.find()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.arrayFilters.html">Bulk.find.arrayFilters()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.collation.html">Bulk.find.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.hint.html">Bulk.find.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.remove.html">Bulk.find.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.removeOne.html">Bulk.find.removeOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.replaceOne.html">Bulk.find.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.updateOne.html">Bulk.find.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.update.html">Bulk.find.update()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.find.upsert.html">Bulk.find.upsert()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.getOperations.html">Bulk.getOperations()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.insert.html">Bulk.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.tojson.html">Bulk.tojson()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Bulk.toString.html">Bulk.toString()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-user-management.html">User Management Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.auth.html">db.auth()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.changeUserPassword.html">db.changeUserPassword()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.createUser.html">db.createUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropUser.html">db.dropUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropAllUsers.html">db.dropAllUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getUser.html">db.getUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getUsers.html">db.getUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.grantRolesToUser.html">db.grantRolesToUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.removeUser.html">db.removeUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.revokeRolesFromUser.html">db.revokeRolesFromUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.updateUser.html">db.updateUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/passwordPrompt.html">passwordPrompt()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-role-management.html">Role Management Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.createRole.html">db.createRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropRole.html">db.dropRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.dropAllRoles.html">db.dropAllRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getRole.html">db.getRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getRoles.html">db.getRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.grantPrivilegesToRole.html">db.grantPrivilegesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.revokePrivilegesFromRole.html">db.revokePrivilegesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.grantRolesToRole.html">db.grantRolesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.revokeRolesFromRole.html">db.revokeRolesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.updateRole.html">db.updateRole()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-replication.html">Replication Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/rs.add.html">rs.add()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.addArb.html">rs.addArb()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.conf.html">rs.conf()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.freeze.html">rs.freeze()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.help.html">rs.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.initiate.html">rs.initiate()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.printReplicationInfo.html">rs.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.printSlaveReplicationInfo.html">rs.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.reconfig.html">rs.reconfig()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.remove.html">rs.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.slaveOk.html">rs.slaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.status.html">rs.status()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.stepDown.html">rs.stepDown()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rs.syncFrom.html">rs.syncFrom()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-sharding.html">Sharding Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/sh.addShard.html">sh.addShard()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.addShardTag.html">sh.addShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.addShardToZone.html">sh.addShardToZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.addTagRange.html">sh.addTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.disableBalancing.html">sh.disableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.enableBalancing.html">sh.enableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.disableAutoSplit.html">sh.disableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.enableAutoSplit.html">sh.enableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.enableSharding.html">sh.enableSharding()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.getBalancerHost.html">sh.getBalancerHost()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.getBalancerState.html">sh.getBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeTagRange.html">sh.removeTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeRangeFromZone.html">sh.removeRangeFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.help.html">sh.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.isBalancerRunning.html">sh.isBalancerRunning()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.moveChunk.html">sh.moveChunk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeShardTag.html">sh.removeShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.removeShardFromZone.html">sh.removeShardFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.setBalancerState.html">sh.setBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.shardCollection.html">sh.shardCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.splitAt.html">sh.splitAt()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.splitFind.html">sh.splitFind()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.startBalancer.html">sh.startBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.status.html">sh.status()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.stopBalancer.html">sh.stopBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.waitForBalancer.html">sh.waitForBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.waitForBalancerOff.html">sh.waitForBalancerOff()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.waitForPingChange.html">sh.waitForPingChange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sh.updateZoneKeyRange.html">sh.updateZoneKeyRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/convertShardKeyToHashed.html">convertShardKeyToHashed</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-free-monitoring.html">Free Monitoring Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/db.disableFreeMonitoring.html">db.disableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.enableFreeMonitoring.html">db.enableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/db.getFreeMonitoringStatus.html">db.getFreeMonitoringStatus</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-constructor.html">Object Constructors and Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/BulkWriteResult.html">BulkWriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Date.html">Date()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.html">ObjectId</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.getTimestamp.html">ObjectId.getTimestamp()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.toString.html">ObjectId.toString()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ObjectId.valueOf.html">ObjectId.valueOf()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/UUID.html">UUID()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/WriteResult.html">WriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/WriteResult.hasWriteError.html">WriteResult.hasWriteError()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/WriteResult.hasWriteConcernError.html">WriteResult.hasWriteConcernError()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-connection.html">Connection Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/connect.html">connect()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.html">Mongo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.getDB.html">Mongo.getDB()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.getReadPrefMode.html">Mongo.getReadPrefMode()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.getReadPrefTagSet.html">Mongo.getReadPrefTagSet()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.isCausalConsistency.html">Mongo.isCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.setCausalConsistency.html">Mongo.setCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.setReadPref.html">Mongo.setReadPref()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.setSlaveOk.html">Mongo.setSlaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.startSession.html">Mongo.startSession()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Mongo.watch.html">Mongo.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/Session.html">Session</a><ul><li class="toctree-l5"><a class="reference internal" href="../method/Session.abortTransaction.html">Session.abortTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="../method/Session.commitTransaction.html">Session.commitTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="../method/Session.startTransaction.html">Session.startTransaction()</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../method/SessionOptions.html">SessionOptions</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-native.html">Native Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/cat.html">cat()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/cd.html">cd()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/copyDbpath.html">copyDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/getHostName.html">getHostName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/getMemInfo.html">getMemInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/hostname.html">hostname()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/isInteractive.html">isInteractive()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/listFiles.html">listFiles()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/load.html">load()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ls.html">ls()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/md5sumFile.html">md5sumFile()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/mkdir.html">mkdir()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/pwd.html">pwd()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/quit.html">quit()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/removeFile.html">removeFile()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/resetDbpath.html">resetDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/sleep.html">sleep()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/setVerboseShell.html">setVerboseShell()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/version.html">version()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/isWindows.html">_isWindows()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/rand.html">_rand()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../method/js-client-side-field-level-encryption.html">Client-Side Field Level Encryption Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../method/getKeyVault.html">getKeyVault()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.createKey.html">KeyVault.createKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.deleteKey.html">KeyVault.deleteKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.getKey.html">KeyVault.getKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.getKeys.html">KeyVault.getKeys()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.addKeyAlternateName.html">KeyVault.addKeyAlternateName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.removeKeyAlternateName.html">KeyVault.removeKeyAlternateName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/KeyVault.getKeyByAltName.html">KeyVault.getKeyByAltName()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/getClientEncryption.html">getClientEncryption()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ClientEncryption.encrypt.html">ClientEncryption.encrypt()</a></li><li class="toctree-l4"><a class="reference internal" href="../method/ClientEncryption.decrypt.html">ClientEncryption.decrypt()</a></li></ul></li></ul></li><li class="toctree-l2 current"><a class="reference internal" href="../program.html">MongoDB Package Components</a><ul class="current"><li class="toctree-l3 current"><a class="reference internal current" href=""><code class="docutils literal"><span class="pre">mongod</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongos.html"><code class="docutils literal"><span class="pre">mongos</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongo.html"><code class="docutils literal"><span class="pre">mongo</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongod.exe.html"><code class="docutils literal"><span class="pre">mongod.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongos.exe.html"><code class="docutils literal"><span class="pre">mongos.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongodump.html"><code class="docutils literal"><span class="pre">mongodump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongorestore.html"><code class="docutils literal"><span class="pre">mongorestore</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="bsondump.html"><code class="docutils literal"><span class="pre">bsondump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoimport.html"><code class="docutils literal"><span class="pre">mongoimport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoexport.html"><code class="docutils literal"><span class="pre">mongoexport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongostat.html"><code class="docutils literal"><span class="pre">mongostat</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongotop.html"><code class="docutils literal"><span class="pre">mongotop</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoreplay.html"><code class="docutils literal"><span class="pre">mongoreplay</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongoldap.html"><code class="docutils literal"><span class="pre">mongoldap</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="mongofiles.html"><code class="docutils literal"><span class="pre">mongofiles</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="install_compass.html"><code class="docutils literal"><span class="pre">install_compass</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../configuration-options.html">Configuration File Options</a><ul><li class="toctree-l3"><a class="reference internal" href="../expansion-directives.html">Externally Sourced Configuration File Values</a></li><li class="toctree-l3"><a class="reference internal" href="../../tutorial/convert-command-line-options-to-yaml.html">Convert Command-Line Options to YAML</a></li><li class="toctree-l3"><a class="reference internal" href="../configuration-file-settings-command-line-options-mapping.html">Configuration File Settings and Command-Line Options Mapping</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../parameters.html">MongoDB Server Parameters</a></li><li class="toctree-l2"><a class="reference internal" href="../limits.html">MongoDB Limits and Thresholds</a></li><li class="toctree-l2"><a class="reference internal" href="../explain-results.html">Explain Results</a></li><li class="toctree-l2"><a class="reference internal" href="../system-collections.html">System Collections</a></li><li class="toctree-l2"><a class="reference internal" href="../connection-string.html">Connection String URI Format</a></li><li class="toctree-l2"><a class="reference internal" href="../collation.html">Collation</a><ul><li class="toctree-l3"><a class="reference internal" href="../collation-locales-defaults.html">Collation Locales and Default Parameters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../mongodb-wire-protocol.html">MongoDB Wire Protocol</a></li><li class="toctree-l2"><a class="reference internal" href="../log-messages.html">Log Messages</a></li><li class="toctree-l2"><a class="reference internal" href="../exit-codes.html">Exit Codes and Statuses</a></li><li class="toctree-l2"><a class="reference internal" href="../glossary.html">Glossary</a></li><li class="toctree-l2"><a class="reference internal" href="../default-mongodb-port.html">Default MongoDB Port</a></li><li class="toctree-l2"><a class="reference internal" href="../server-sessions.html">Server Sessions</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../release-notes.html">Release Notes</a><ul><li class="toctree-l2"><a class="reference internal" href="../../release-notes/4.2.html">Release Notes for MongoDB 4.2</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-compatibility.html">Compatibility Changes in MongoDB 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-upgrade-standalone.html">Upgrade a Standalone to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-upgrade-replica-set.html">Upgrade a Replica Set to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-downgrade.html">Downgrade 4.2 to 4.0</a><ul><li class="toctree-l4"><a class="reference internal" href="../../release-notes/4.2-downgrade-standalone.html">Downgrade 4.2 Standalone to 4.0</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/4.2-downgrade-replica-set.html">Downgrade 4.2 Replica Set to 4.0</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/4.2-downgrade-sharded-cluster.html">Downgrade 4.2 Sharded Cluster to 4.0</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.2-changelog.html">4.2 Changelog</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/4.0.html">Release Notes for MongoDB 4.0</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-compatibility.html">Compatibility Changes in MongoDB 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-upgrade-standalone.html">Upgrade a Standalone to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-upgrade-replica-set.html">Upgrade a Replica Set to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-downgrade-standalone.html">Downgrade 4.0 Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-downgrade-replica-set.html">Downgrade 4.0 Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-downgrade-sharded-cluster.html">Downgrade 4.0 Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/4.0-changelog.html">4.0 Changelog</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.6.html">Release Notes for MongoDB 3.6</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-changelog.html">3.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-compatibility.html">Compatibility Changes in MongoDB 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-upgrade-standalone.html">Upgrade a Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-upgrade-replica-set.html">Upgrade a Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-downgrade-standalone.html">Downgrade 3.6 Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-downgrade-replica-set.html">Downgrade 3.6 Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.6-downgrade-sharded-cluster.html">Downgrade 3.6 Sharded Cluster to 3.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.4.html">Release Notes for MongoDB 3.4</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-changelog.html">3.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-compatibility.html">Compatibility Changes in MongoDB 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-upgrade-standalone.html">Upgrade a Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-upgrade-replica-set.html">Upgrade a Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.4-downgrade.html">Downgrade MongoDB 3.4 to 3.2</a><ul><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.4-downgrade-standalone.html">Downgrade 3.4 Standalone to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.4-downgrade-replica-set.html">Downgrade 3.4 Replica Set to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.4-downgrade-sharded-cluster.html">Downgrade 3.4 Sharded Cluster to 3.2</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.2.html">Release Notes for MongoDB 3.2</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-changelog.html">3.2 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-compatibility.html">Compatibility Changes in MongoDB 3.2</a><ul><li class="toctree-l4"><a class="reference internal" href="../../release-notes/3.2-javascript.html">JavaScript Changes in MongoDB 3.2</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-upgrade.html">Upgrade MongoDB to 3.2</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.2-downgrade.html">Downgrade MongoDB from 3.2</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/3.0.html">Release Notes for MongoDB 3.0</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-changelog.html">3.0 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-compatibility.html">Compatibility Changes in MongoDB 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-upgrade.html">Upgrade MongoDB to 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-scram.html">Upgrade to SCRAM</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/3.0-downgrade.html">Downgrade MongoDB from 3.0</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.6.html">Release Notes for MongoDB 2.6</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-changelog.html">2.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-compatibility.html">Compatibility Changes in MongoDB 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-upgrade.html">Upgrade MongoDB to 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-upgrade-authorization.html">Upgrade User Authorization Data to 2.6 Format</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.6-downgrade.html">Downgrade MongoDB from 2.6</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.4.html">Release Notes for MongoDB 2.4</a><ul><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-changelog.html">2.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-javascript.html">JavaScript Changes in MongoDB 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-upgrade.html">Upgrade MongoDB to 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="../../release-notes/2.4-index-types.html">Compatibility and Index Type Changes in MongoDB 2.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.2.html">Release Notes for MongoDB 2.2</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/2.0.html">Release Notes for MongoDB 2.0</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.8.html">Release Notes for MongoDB 1.8</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.6.html">Release Notes for MongoDB 1.6</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.4.html">Release Notes for MongoDB 1.4</a></li><li class="toctree-l2"><a class="reference internal" href="../../release-notes/1.2.html">Release Notes for MongoDB 1.2.x</a></li><li class="toctree-l2"><a class="reference internal" href="../versioning.html">MongoDB Versioning</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../../support.html">Technical Support</a></li></ul>


    </div>
  </div>
           
         </aside>

   </div>

    <div id="main-column" class="main-column">

    <span id="showNav" class="showNav">Navigation</span>

      
        <div class="document">
            <div class="documentwrapper"><div class="bodywrapper">
              <div class="body" data-pagename="reference/program/mongod">
                   <a class="edit-link" href="https://github.com/mongodb/docs/blob/v4.2/source/reference/program/mongod.txt" target="_blank" title="Edit reference/program/mongod.txt on GitHub">
    
      <span class="icon-edit"></span>
    
  </a>
                

                
  <div class="bc">
    
      <ul>
          <li><a href="../../reference.html">Reference</a><span class="bcpoint"> > </span></li>
            
          <li><a href="../program.html">MongoDB Package Components</a><span class="bcpoint"> > </span></li>
            <li><code class="docutils literal"><span class="pre">mongod</span></code></li> 
      </ul>
    
    
  </div>
                
                  <div class="section" id="mongod">
<span id="id1"></span><h1><code class="docutils literal"><span class="pre">mongod</span></code><a class="headerlink" href="#mongod" title="Permalink to this headline">¶</a></h1>
<div class="contents singlecol local topic" id="on-this-page">
<p class="topic-title first">On this page</p>
<ul class="simple">
<li><a class="reference internal" href="#synopsis" id="id17">Synopsis</a></li>
<li><a class="reference internal" href="#options" id="id18">Options</a><ul>
<li><a class="reference internal" href="#core-options" id="id19">Core Options</a></li>
<li><a class="reference internal" href="#free-monitoring" id="id20">Free Monitoring</a></li>
<li><a class="reference internal" href="#ldap-authentication-or-authorization-options" id="id21">LDAP Authentication or Authorization Options</a></li>
<li><a class="reference internal" href="#storage-options" id="id22">Storage Options</a></li>
<li><a class="reference internal" href="#wiredtiger-options" id="id23">WiredTiger Options</a></li>
<li><a class="reference internal" href="#replication-options" id="id24">Replication Options</a></li>
<li><a class="reference internal" href="#sharded-cluster-options" id="id25">Sharded Cluster Options</a></li>
<li><a class="reference internal" href="#tls-options" id="id26">TLS Options</a></li>
<li><a class="reference internal" href="#ssl-options-deprecated" id="id27">SSL Options (Deprecated)</a></li>
<li><a class="reference internal" href="#profiler-options" id="id28">Profiler Options</a></li>
<li><a class="reference internal" href="#audit-options" id="id29">Audit Options</a></li>
<li><a class="reference internal" href="#snmp-options" id="id30">SNMP Options</a></li>
<li><a class="reference internal" href="#inmemory-options" id="id31">inMemory Options</a></li>
<li><a class="reference internal" href="#encryption-key-management-options" id="id32">Encryption Key Management Options</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="synopsis">
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> is the primary daemon process for the MongoDB
system. It handles data requests, manages data access, and performs
background management operations.</p>
<p>This document provides a complete overview of all command line options
for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>. These command line options are primarily useful
for testing: In common operation, use the <a class="reference internal" href="../configuration-options.html"><span class="doc">configuration file
options</span></a> to control the behavior of
your database.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../configuration-file-settings-command-line-options-mapping.html#conf-file-command-line-mapping"><span class="std std-ref">Configuration File Settings and Command-Line Options Mapping</span></a></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in version 4.0, MongoDB disables support for TLS 1.0
encryption on systems where TLS 1.1+ is available. For
more details, see <a class="reference internal" href="../../release-notes/4.0.html#disable-tls"><span class="std std-ref">Disable TLS 1.0</span></a>.</p>
</div>
</div>
<div class="section" id="options">
<span id="mongod-options"></span><h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<dl class="hidden binary">
<dt id="bin.mongod">
<code class="descname">mongod</code><a class="headerlink" href="#bin.mongod" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<div class="admonition-starting-in-version-4-2 admonition">
<p class="first admonition-title">Starting in version 4.2</p>
<ul class="last simple">
<li>MongoDB deprecates the SSL options and insteads adds new
corresponding TLS options.</li>
<li>MongoDB adds
<a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a>/<a class="reference internal" href="../configuration-options.html#net.tls.clusterCAFile" title="net.tls.clusterCAFile"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.tls.clusterCAFile</span></code></a>. (Also availalbe
in 3.4.18+, 3.6.9+, 4.0.3+)</li>
</ul>
</div>
<div class="section" id="core-options">
<h3>Core Options<a class="headerlink" href="#core-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-help">
<code class="descname">--help</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">-h</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns information on the options and use of <strong class="program">mongod</strong>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-version">
<code class="descname">--version</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-version" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the <strong class="program">mongod</strong> release number.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-config">
<code class="descname">--config</code><code class="descclassname"> &lt;filename&gt;</code><code class="descclassname">, </code><code class="descname">-f</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-config" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies a configuration file for runtime configuration options. The
configuration file is the preferred method for runtime configuration of
<strong class="program">mongod</strong>. The options are equivalent to the command-line
configuration options. See <a class="reference internal" href="../configuration-options.html"><span class="doc">Configuration File Options</span></a> for
more information.</p>
<p>Ensure the configuration file uses ASCII encoding. The <strong class="program">mongod</strong>
instance does not support configuration files with non-ASCII encoding,
including UTF-8.</p>
</dd></dl>

<span class="target" id="mongod-configexpand"></span><dl class="option">
<dt id="cmdoption-mongod-configexpand">
<code class="descname">--configExpand</code><code class="descclassname"> &lt;none|rest|exec&gt;</code><a class="headerlink" href="#cmdoption-mongod-configexpand" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: none</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Enables using <a class="reference internal" href="../expansion-directives.html#externally-sourced-values"><span class="std std-ref">Expansion Directives</span></a>
in configuration files. Expansion directives allow you to set
externally sourced values for configuration file options.</p>
<p><a class="reference internal" href="#cmdoption-mongod-configexpand"><code class="xref std std-option docutils literal"><span class="pre">--configExpand</span></code></a> supports the following expansion directives:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">none</span></code></td>
<td>Default. <strong class="program">mongod</strong> does not expand expansion directives.
<strong class="program">mongod</strong> fails to start if any configuration file settings
use expansion directives.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">rest</span></code></td>
<td><strong class="program">mongod</strong> expands <code class="docutils literal"><span class="pre">__rest</span></code> expansion directives when
parsing the configuration file.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">exec</span></code></td>
<td><strong class="program">mongod</strong> expands <code class="docutils literal"><span class="pre">__exec</span></code> expansion directives when
parsing the configuration file.</td>
</tr>
</tbody>
</table>
<p>You can specify multiple expansion directives as a comma-separated
list, e.g. <code class="docutils literal"><span class="pre">rest,</span> <span class="pre">exec</span></code>. If the configuration file contains
expansion directives not specified to <a class="reference internal" href="#cmdoption-mongod-configexpand"><code class="xref std std-option docutils literal"><span class="pre">--configExpand</span></code></a>, the <strong class="program">mongod</strong>
returns an error and terminates.</p>
<p>See <a class="reference internal" href="../expansion-directives.html#externally-sourced-values"><span class="std std-ref">Externally Sourced Configuration File Values</span></a> for configuration files
for more information on expansion directives.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-verbose">
<code class="descname">--verbose</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">-v</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-verbose" title="Permalink to this definition">¶</a></dt>
<dd><p>Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the <code class="docutils literal"><span class="pre">-v</span></code> form by
including the option multiple times, (e.g. <code class="docutils literal"><span class="pre">-vvvvv</span></code>.)</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in version 4.2, MongoDB includes the Debug verbosity level
(1-5) in the <a class="reference internal" href="../log-messages.html#log-severity-levels"><span class="std std-ref">log messages</span></a>. For example,
if the verbosity level is 2, MongoDB logs <code class="docutils literal"><span class="pre">D2</span></code>. In previous
versions, MongoDB log messages only specified <code class="docutils literal"><span class="pre">D</span></code> for Debug level.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-quiet">
<code class="descname">--quiet</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-quiet" title="Permalink to this definition">¶</a></dt>
<dd><p>Runs <strong class="program">mongod</strong> in a quiet mode that attempts to limit the amount
of output.</p>
<p>This option suppresses:</p>
<ul class="simple">
<li>output from <a class="reference internal" href="../glossary.html#term-database-command"><span class="xref std std-term">database commands</span></a></li>
<li>replication activity</li>
<li>connection accepted events</li>
<li>connection closed events</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-port">
<code class="descname">--port</code><code class="descclassname"> &lt;port&gt;</code><a class="headerlink" href="#cmdoption-mongod-port" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>:</p>
<ul class="simple">
<li>27017 if <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> is not a shard member or a config server member</li>
<li>27018 if <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> is a <a class="reference internal" href="#cmdoption-mongod-shardsvr"><code class="xref std std-option docutils literal"><span class="pre">shard</span> <span class="pre">member</span></code></a></li>
<li>27019 if <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> is a <a class="reference internal" href="#cmdoption-mongod-configsvr"><code class="xref std std-option docutils literal"><span class="pre">config</span> <span class="pre">server</span> <span class="pre">member</span></code></a></li>
</ul>
<p>The TCP port on which the MongoDB instance listens for
client connections.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-bind-ip">
<code class="descname">--bind_ip</code><code class="descclassname"> &lt;hostnames|ipaddresses|Unix domain socket paths&gt;</code><a class="headerlink" href="#cmdoption-mongod-bind-ip" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: localhost</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 3.6, <strong class="program">mongod</strong> bind to localhost
by default. See <a class="reference internal" href="../../release-notes/3.6.html#bind-to-localhost"><span class="std std-ref">Default Bind to Localhost</span></a>.</p>
</div>
<p>The hostnames and/or IP addresses and/or full Unix domain socket
paths on which <strong class="program">mongod</strong> should listen for client connections. You
may attach <strong class="program">mongod</strong> to any interface. To bind to multiple
addresses, enter a list of comma-separated values.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last"><code class="docutils literal"><span class="pre">localhost,/tmp/mongod.sock</span></code></p>
</div>
<p>You can specify both IPv4 and IPv6 addresses, or hostnames that
resolve to an IPv4 or IPv6 address.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last"><code class="docutils literal"><span class="pre">localhost,</span> <span class="pre">2001:0DB8:e132:ba26:0d5c:2774:e7f9:d513</span></code></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If specifying an IPv6 address <em>or</em> a hostname that resolves to an
IPv6 address to <a class="reference internal" href="#cmdoption-mongod-bind-ip"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip</span></code></a>, you must start <strong class="program">mongod</strong> with
<a class="reference internal" href="#cmdoption-mongod-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a> to enable IPv6 support. Specifying an IPv6 address
to <a class="reference internal" href="#cmdoption-mongod-bind-ip"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip</span></code></a> does not enable IPv6 support.</p>
</div>
<p>If specifying a
<a class="reference external" href="https://en.wikipedia.org/w/index.php?title=Link-local_address&amp;oldid=880793020#IPv6">link-local IPv6 address</a>
(<code class="docutils literal"><span class="pre">fe80::/10</span></code>), you must append the
<a class="reference external" href="https://en.wikipedia.org/w/index.php?title=IPv6_address&amp;oldid=877601778#Scoped_literal_IPv6_addresses">zone index</a>
to that address (i.e. <code class="docutils literal"><span class="pre">fe80::&lt;address&gt;%&lt;adapter-name&gt;</span></code>).</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last"><code class="docutils literal"><span class="pre">localhost,fe80::a00:27ff:fee0:1fcf%enp0s3</span></code></p>
</div>
<div class="admonition-tip admonition">
<p class="first admonition-title">Tip</p>
<p class="last">When possible, use a logical DNS hostname instead of an ip address,
particularly when configuring replica set members or sharded cluster
members. The use of logical DNS hostnames avoids configuration
changes due to ip address changes.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Before binding to a non-localhost (e.g. publicly accessible)
IP address, ensure you have secured your cluster from unauthorized
access. For a complete list of security recommendations, see
<a class="reference internal" href="../../administration/security-checklist.html"><span class="doc">Security Checklist</span></a>. At minimum, consider
<a class="reference internal" href="../../administration/security-checklist.html#checklist-auth"><span class="std std-ref">enabling authentication</span></a> and
<a class="reference internal" href="../../core/security-hardening.html"><span class="doc">hardening network infrastructure</span></a>.</p>
</div>
<p>For more information about IP Binding, refer to the
<a class="reference internal" href="../../core/security-mongodb-configuration.html"><span class="doc">IP Binding</span></a> documentation.</p>
<p>To bind to all IPv4 addresses, enter <code class="docutils literal"><span class="pre">0.0.0.0</span></code>.</p>
<p>To bind to all IPv4 and IPv6 addresses, enter <code class="docutils literal"><span class="pre">::,0.0.0.0</span></code> or
starting in MongoDB 4.2, an asterisk <code class="docutils literal"><span class="pre">&quot;*&quot;</span></code> (enclose the asterisk in
quotes to avoid filename pattern expansion). Alternatively, use the
<a class="reference internal" href="../configuration-options.html#net.bindIpAll" title="net.bindIpAll"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIpAll</span></code></a> setting.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">--bind_ip</span></code> and <code class="docutils literal"><span class="pre">--bind_ip_all</span></code> are mutually exclusive.
Specifying both options causes <strong class="program">mongod</strong> to throw an error and
terminate.</li>
<li>The command-line option <code class="docutils literal"><span class="pre">--bind</span></code> overrides the configuration
file setting <a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a>.</li>
</ul>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-bind-ip-all">
<code class="descname">--bind_ip_all</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-bind-ip-all" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.6.</span></p>
</div>
<p>If specified, the <strong class="program">mongod</strong> instance binds to all IPv4
addresses (i.e. <code class="docutils literal"><span class="pre">0.0.0.0</span></code>). If <strong class="program">mongod</strong> starts with
<a class="reference internal" href="#cmdoption-mongod-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a>, <a class="reference internal" href="#cmdoption-mongod-bind-ip-all"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip_all</span></code></a> also binds to all IPv6 addresses
(i.e. <code class="docutils literal"><span class="pre">::</span></code>).</p>
<p><strong class="program">mongod</strong> only supports IPv6 if started with <a class="reference internal" href="#cmdoption-mongod-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a>. Specifying
<a class="reference internal" href="#cmdoption-mongod-bind-ip-all"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip_all</span></code></a> alone does not enable IPv6 support.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Before binding to a non-localhost (e.g. publicly accessible)
IP address, ensure you have secured your cluster from unauthorized
access. For a complete list of security recommendations, see
<a class="reference internal" href="../../administration/security-checklist.html"><span class="doc">Security Checklist</span></a>. At minimum, consider
<a class="reference internal" href="../../administration/security-checklist.html#checklist-auth"><span class="std std-ref">enabling authentication</span></a> and
<a class="reference internal" href="../../core/security-hardening.html"><span class="doc">hardening network infrastructure</span></a>.</p>
</div>
<p>For more information about IP Binding, refer to the
<a class="reference internal" href="../../core/security-mongodb-configuration.html"><span class="doc">IP Binding</span></a> documentation.</p>
<p>Alternatively, you can set the <code class="docutils literal"><span class="pre">--bind_ip</span></code> option to <code class="docutils literal"><span class="pre">::,0.0.0.0</span></code>
or, starting in MongoDB 4.2, to an asterisk <code class="docutils literal"><span class="pre">&quot;*&quot;</span></code> (enclose the
asterisk in quotes to avoid filename pattern expansion).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><code class="docutils literal"><span class="pre">--bind_ip</span></code> and <code class="docutils literal"><span class="pre">--bind_ip_all</span></code> are mutually exclusive. That
is, you can specify one or the other, but not both.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-clusteripsourcewhitelist">
<code class="descname">--clusterIpSourceWhitelist</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-clusteripsourcewhitelist" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.6.</span></p>
</div>
<p>A list of IP addresses/CIDR (<a class="reference external" href="https://tools.ietf.org/html/rfc4632">Classless Inter-Domain Routing</a>) ranges against which the
<a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> validates authentication requests from other members of
the replica set and, if part of a sharded cluster, the <a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>
instances. The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> verifies that the originating IP is
either explicitly in the list or belongs to a CIDR range in the list. If the
IP address is not present, the server does not authenticate the
<a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> or <a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongod-clusteripsourcewhitelist"><code class="xref std std-option docutils literal"><span class="pre">--clusterIpSourceWhitelist</span></code></a> has no effect on a <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> started without
<a class="reference internal" href="../../core/authentication.html#authentication"><span class="std std-ref">authentication</span></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongod-clusteripsourcewhitelist"><code class="xref std std-option docutils literal"><span class="pre">--clusterIpSourceWhitelist</span></code></a> accepts multiple comma-separated IPv4/6 addresses or Classless
Inter-Domain Routing (<a class="reference external" href="https://tools.ietf.org/html/rfc4632">CIDR</a>) ranges:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-shell"><div class="highlight"><pre><span></span>mongod --clusterIpSourceWhitelist <span class="m">192</span>.0.2.0/24,127.0.0.1,::1
</pre></div>
</div>
</div>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">Ensure <a class="reference internal" href="#cmdoption-mongod-clusteripsourcewhitelist"><code class="xref std std-option docutils literal"><span class="pre">--clusterIpSourceWhitelist</span></code></a> includes the IP address <em>or</em> CIDR ranges that include the
IP address of each replica set member or <a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> in the
deployment to ensure healthy communication between cluster components.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ipv6">
<code class="descname">--ipv6</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-ipv6" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables IPv6 support. <strong class="program">mongod</strong> disables IPv6 support by default.</p>
<p>Setting <a class="reference internal" href="#cmdoption-mongod-ipv6"><code class="xref std std-option docutils literal"><span class="pre">--ipv6</span></code></a> does <em>not</em> direct the <strong class="program">mongod</strong> to listen on any
local IPv6 addresses or interfaces. To configure the <strong class="program">mongod</strong> to
listen on an IPv6 interface, you must either:</p>
<ul class="simple">
<li>Configure <a class="reference internal" href="#cmdoption-mongod-bind-ip"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip</span></code></a> with one or more IPv6 addresses or
hostnames that resolve to IPv6 addresses, <strong>or</strong></li>
<li>Set <a class="reference internal" href="#cmdoption-mongod-bind-ip-all"><code class="xref std std-option docutils literal"><span class="pre">--bind_ip_all</span></code></a> to <code class="docutils literal"><span class="pre">true</span></code>.</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-listenbacklog">
<code class="descname">--listenBacklog</code><code class="descclassname"> &lt;number&gt;</code><a class="headerlink" href="#cmdoption-mongod-listenbacklog" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: Target system <code class="docutils literal"><span class="pre">SOMAXCONN</span></code> constant</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.6.</span></p>
</div>
<p>The maximum number of connections that can exist in the listen
queue.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Consult your local system’s documentation to understand the
limitations and configuration requirements before using this
parameter.</p>
</div>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">To prevent undefined behavior, specify a value for this
parameter between <code class="docutils literal"><span class="pre">1</span></code> and the local system <code class="docutils literal"><span class="pre">SOMAXCONN</span></code>
constant.</p>
</div>
<p>The default value for the <code class="docutils literal"><span class="pre">listenBacklog</span></code> parameter is set at
compile time to the target system <code class="docutils literal"><span class="pre">SOMAXCONN</span></code> constant.
<code class="docutils literal"><span class="pre">SOMAXCONN</span></code> is the maximum valid value that is documented for
the <em>backlog</em> parameter to the <em>listen</em> system call.</p>
<p>Some systems may interpret <code class="docutils literal"><span class="pre">SOMAXCONN</span></code> symbolically, and others
numerically. The actual <em>listen backlog</em> applied in practice may
differ from any numeric interpretation of the <code class="docutils literal"><span class="pre">SOMAXCONN</span></code> constant
or argument to <code class="docutils literal"><span class="pre">--listenBacklog</span></code>, and may also be constrained by
system settings like <code class="docutils literal"><span class="pre">net.core.somaxconn</span></code> on Linux.</p>
<p>Passing a value for the <code class="docutils literal"><span class="pre">listenBacklog</span></code> parameter that exceeds the
<code class="docutils literal"><span class="pre">SOMAXCONN</span></code> constant for the local system is, by the letter of the
standards, undefined behavior. Higher values may be silently integer
truncated, may be ignored, may cause unexpected resource
consumption, or have other adverse consequences.</p>
<p>On systems with workloads that exhibit connection spikes, for which
it is empirically known that the local system can honor higher
values for the <em>backlog</em> parameter than the <code class="docutils literal"><span class="pre">SOMAXCONN</span></code> constant,
setting the <code class="docutils literal"><span class="pre">listenBacklog</span></code> parameter to a higher value may reduce
operation latency as observed by the client by reducing the number
of connections which are forced into a backoff state.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-maxconns">
<code class="descname">--maxConns</code><code class="descclassname"> &lt;number&gt;</code><a class="headerlink" href="#cmdoption-mongod-maxconns" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum number of simultaneous connections that <strong class="program">mongod</strong> will
accept. This setting has no effect if it is higher than your operating
system’s configured maximum connection tracking threshold.</p>
<p>Do not assign too low of a value to this option, or you will
encounter errors during normal application operation.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-logpath">
<code class="descname">--logpath</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongod-logpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends all diagnostic logging information to a log file instead of to
standard output or to the host’s <a class="reference internal" href="../glossary.html#term-syslog"><span class="xref std std-term">syslog</span></a> system. MongoDB creates
the log file at the path you specify.</p>
<p>By default, MongoDB will move any existing log file rather than overwrite
it. To instead append to the log file, set the <a class="reference internal" href="#cmdoption-mongod-logappend"><code class="xref std std-option docutils literal"><span class="pre">--logappend</span></code></a> option.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-syslog">
<code class="descname">--syslog</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-syslog" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends all logging output to the host’s <a class="reference internal" href="../glossary.html#term-syslog"><span class="xref std std-term">syslog</span></a> system rather
than to standard output or to a log file (<a class="reference internal" href="#cmdoption-mongod-logpath"><code class="xref std std-option docutils literal"><span class="pre">--logpath</span></code></a>).</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-syslog"><code class="xref std std-option docutils literal"><span class="pre">--syslog</span></code></a> option is not supported on Windows.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The <code class="docutils literal"><span class="pre">syslog</span></code> daemon generates timestamps when it logs a message, not
when MongoDB issues the message. This can lead to misleading timestamps
for log entries, especially when the system is under heavy load. We
recommend using the <a class="reference internal" href="#cmdoption-mongod-logpath"><code class="xref std std-option docutils literal"><span class="pre">--logpath</span></code></a> option for production systems to
ensure accurate timestamps.</p>
</div>
<p>Starting in version 4.2, MongoDB includes the <a class="reference internal" href="../log-messages.html#log-message-components"><span class="std std-ref">component</span></a> in its log messages to <code class="docutils literal"><span class="pre">syslog</span></code>.</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-none"><div class="highlight"><pre><span></span>...  ACCESS   [repl writer worker 5] Unsupported modification to roles collection ...
</pre></div>
</div>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-syslogfacility">
<code class="descname">--syslogFacility</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-syslogfacility" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: user</p>
<p>Specifies the facility level used when logging messages to syslog.
The value you specify must be supported by your
operating system’s implementation of syslog. To use this option, you
must  enable the <a class="reference internal" href="#cmdoption-mongod-syslog"><code class="xref std std-option docutils literal"><span class="pre">--syslog</span></code></a> option.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-logappend">
<code class="descname">--logappend</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-logappend" title="Permalink to this definition">¶</a></dt>
<dd><p>Appends new entries to the end of the existing log file when the <strong class="program">mongod</strong>
instance restarts. Without this option, <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> will back up the
existing log and create a new file.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-logrotate">
<code class="descname">--logRotate</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-logrotate" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: rename</p>
<p>Determines the behavior for the <a class="reference internal" href="../command/logRotate.html#dbcmd.logRotate" title="logRotate"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">logRotate</span></code></a> command.
Specify either <code class="docutils literal"><span class="pre">rename</span></code> or <code class="docutils literal"><span class="pre">reopen</span></code>:</p>
<ul>
<li><p class="first"><code class="docutils literal"><span class="pre">rename</span></code> renames the log file.</p>
</li>
<li><p class="first"><code class="docutils literal"><span class="pre">reopen</span></code> closes and reopens the log file following the typical
Linux/Unix log rotate behavior. Use <code class="docutils literal"><span class="pre">reopen</span></code> when using the
Linux/Unix logrotate utility to avoid log loss.</p>
<p>If you specify <code class="docutils literal"><span class="pre">reopen</span></code>, you must also use <a class="reference internal" href="#cmdoption-mongod-logappend"><code class="xref std std-option docutils literal"><span class="pre">--logappend</span></code></a>.</p>
</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-timestampformat">
<code class="descname">--timeStampFormat</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-timestampformat" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: iso8601-local</p>
<p>The time format for timestamps in log messages. Specify one of the
following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">ctime</span></code></td>
<td>Displays timestamps as <code class="docutils literal"><span class="pre">Wed</span> <span class="pre">Dec</span> <span class="pre">31</span>
<span class="pre">18:17:54.811</span></code>.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">iso8601-utc</span></code></td>
<td>Displays timestamps in Coordinated Universal Time (UTC) in the
ISO-8601 format. For example, for New York at the start of the
Epoch: <code class="docutils literal"><span class="pre">1970-01-01T00:00:00.000Z</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">iso8601-local</span></code></td>
<td>Displays timestamps in local time in the ISO-8601
format. For example, for New York at the start of the Epoch:
<code class="docutils literal"><span class="pre">1969-12-31T19:00:00.000-0500</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-traceexceptions">
<code class="descname">--traceExceptions</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-traceexceptions" title="Permalink to this definition">¶</a></dt>
<dd><p>For internal diagnostic use only.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-pidfilepath">
<code class="descname">--pidfilepath</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongod-pidfilepath" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies a file location to store the process ID (PID) of the <strong class="program">mongod</strong>
process . The user running the the <code class="docutils literal"><span class="pre">mongod</span></code> or <code class="docutils literal"><span class="pre">mongos</span></code>
process must be able to write to this path. If the <a class="reference internal" href="#cmdoption-mongod-pidfilepath"><code class="xref std std-option docutils literal"><span class="pre">--pidfilepath</span></code></a> option is not
specified, the process does not create a PID file. This option is generally
only useful in combination with the the <a class="reference internal" href="#cmdoption-mongod-fork"><code class="xref std std-option docutils literal"><span class="pre">--fork</span></code></a> option.</p>
<div class="note admonition">
<p class="first admonition-title">Linux</p>
<p class="last">On Linux, PID file management is generally the responsibility of
your distro’s init system: usually a service file in the <code class="docutils literal"><span class="pre">/etc/init.d</span></code>
directory, or a systemd unit file registered with <code class="docutils literal"><span class="pre">systemctl</span></code>. Only
use the <a class="reference internal" href="#cmdoption-mongod-pidfilepath"><code class="xref std std-option docutils literal"><span class="pre">--pidfilepath</span></code></a> option if you are not using one of these init
systems. For more information, please see the respective
<a class="reference internal" href="../../installation.html"><span class="doc">Installation Guide</span></a> for your operating system.</p>
</div>
<div class="note admonition">
<p class="first admonition-title">macOS</p>
<p class="last">On macOS, PID file management is generally handled by <code class="docutils literal"><span class="pre">brew</span></code>. Only use
the <a class="reference internal" href="#cmdoption-mongod-pidfilepath"><code class="xref std std-option docutils literal"><span class="pre">--pidfilepath</span></code></a> option if you are not using <code class="docutils literal"><span class="pre">brew</span></code> on your macOS system.
For more information, please see the respective
<a class="reference internal" href="../../installation.html"><span class="doc">Installation Guide</span></a> for your operating system.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-keyfile">
<code class="descname">--keyFile</code><code class="descclassname"> &lt;file&gt;</code><a class="headerlink" href="#cmdoption-mongod-keyfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the path to a key file that stores the shared secret
that MongoDB instances use to authenticate to each other in a
<a class="reference internal" href="../glossary.html#term-sharded-cluster"><span class="xref std std-term">sharded cluster</span></a> or <a class="reference internal" href="../glossary.html#term-replica-set"><span class="xref std std-term">replica set</span></a>. <a class="reference internal" href="#cmdoption-mongod-keyfile"><code class="xref std std-option docutils literal"><span class="pre">--keyFile</span></code></a> implies
<a class="reference internal" href="#cmdoption-mongod-auth"><code class="xref std std-option docutils literal"><span class="pre">--auth</span></code></a>. See <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">Internal/Membership Authentication</span></a> for more
information.</p>
<p>Starting in MongoDB 4.2, <a class="reference internal" href="../../core/security-internal-authentication.html#internal-auth-keyfile"><span class="std std-ref">keyfiles for internal membership
authentication</span></a> use YAML format to allow for
multiple keys in a keyfile. The YAML format accepts content of:</p>
<ul class="simple">
<li>a single key string (same as in earlier versions),</li>
<li>multiple key strings (each string must be enclosed in quotes), or</li>
<li>sequence of key strings.</li>
</ul>
<p>The YAML format is compatible with the existing single-key
keyfiles that use the text file format.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-setparameter">
<code class="descname">--setParameter</code><code class="descclassname"> &lt;options&gt;</code><a class="headerlink" href="#cmdoption-mongod-setparameter" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies one of the MongoDB parameters described in
<a class="reference internal" href="../parameters.html"><span class="doc">MongoDB Server Parameters</span></a>. You can specify multiple <code class="docutils literal"><span class="pre">setParameter</span></code>
fields.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-nounixsocket">
<code class="descname">--nounixsocket</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-nounixsocket" title="Permalink to this definition">¶</a></dt>
<dd><p>Disables listening on the UNIX domain socket. <a class="reference internal" href="#cmdoption-mongod-nounixsocket"><code class="xref std std-option docutils literal"><span class="pre">--nounixsocket</span></code></a> applies only
to Unix-based systems.</p>
<p>The <strong class="program">mongod</strong> process
always listens on the UNIX socket unless one of the following is true:</p>
<ul class="simple">
<li><a class="reference internal" href="#cmdoption-mongod-nounixsocket"><code class="xref std std-option docutils literal"><span class="pre">--nounixsocket</span></code></a> is set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> is not set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> does not specify <code class="docutils literal"><span class="pre">localhost</span></code> or its associated IP address</li>
</ul>
<p><strong class="program">mongod</strong> installed from official <a class="reference internal" href="../../tutorial/install-mongodb-on-debian.html"><span class="doc">.deb</span></a> and <a class="reference internal" href="../../tutorial/install-mongodb-on-red-hat.html"><span class="doc">.rpm</span></a> packages
have the <code class="xref mongodb mongodb-setting docutils literal"><span class="pre">bind_ip</span></code> configuration set to <code class="docutils literal"><span class="pre">127.0.0.1</span></code> by
default.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-unixsocketprefix">
<code class="descname">--unixSocketPrefix</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongod-unixsocketprefix" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: /tmp</p>
<p>The path for the UNIX socket. <a class="reference internal" href="#cmdoption-mongod-unixsocketprefix"><code class="xref std std-option docutils literal"><span class="pre">--unixSocketPrefix</span></code></a> applies only
to Unix-based systems.</p>
<p>If this option has no value, the
<strong class="program">mongod</strong> process creates a socket with <code class="docutils literal"><span class="pre">/tmp</span></code> as a prefix. MongoDB
creates and listens on a UNIX socket unless one of the following is true:</p>
<ul class="simple">
<li><a class="reference internal" href="../configuration-options.html#net.unixDomainSocket.enabled" title="net.unixDomainSocket.enabled"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.unixDomainSocket.enabled</span></code></a> is <code class="docutils literal"><span class="pre">false</span></code></li>
<li><a class="reference internal" href="#cmdoption-mongod-nounixsocket"><code class="xref std std-option docutils literal"><span class="pre">--nounixsocket</span></code></a> is set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> is not set</li>
<li><a class="reference internal" href="../configuration-options.html#net.bindIp" title="net.bindIp"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.bindIp</span></code></a> does not specify <code class="docutils literal"><span class="pre">localhost</span></code> or its associated IP address</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-filepermissions">
<code class="descname">--filePermissions</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongod-filepermissions" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: <code class="docutils literal"><span class="pre">0700</span></code></p>
<p>Sets the permission for the UNIX domain socket file.</p>
<p><a class="reference internal" href="#cmdoption-mongod-filepermissions"><code class="xref std std-option docutils literal"><span class="pre">--filePermissions</span></code></a> applies only to Unix-based systems.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-fork">
<code class="descname">--fork</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-fork" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables a <a class="reference internal" href="../glossary.html#term-daemon"><span class="xref std std-term">daemon</span></a> mode that runs the <strong class="program">mongod</strong> process in the
background. By default <strong class="program">mongod</strong> does not run as a daemon:
typically you will run <strong class="program">mongod</strong> as a daemon, either by using
<a class="reference internal" href="#cmdoption-mongod-fork"><code class="xref std std-option docutils literal"><span class="pre">--fork</span></code></a> or by using a controlling process that handles the
daemonization process (e.g. as with <code class="docutils literal"><span class="pre">upstart</span></code> and <code class="docutils literal"><span class="pre">systemd</span></code>).</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-fork"><code class="xref std std-option docutils literal"><span class="pre">--fork</span></code></a> option is not supported on Windows.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-auth">
<code class="descname">--auth</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-auth" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables authorization to control user’s access to database resources
and operations. When authorization is enabled, MongoDB requires all
clients to authenticate themselves first in order to determine the
access for the client.</p>
<p>Configure users via the <a class="reference internal" href="mongo.html"><span class="doc">mongo shell</span></a>. If no users exist, the localhost interface
will continue to have access to the database until you create
the first user.</p>
<p>See <a class="reference internal" href="../../security.html"><span class="doc">Security</span></a>
for more information.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-noauth">
<code class="descname">--noauth</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-noauth" title="Permalink to this definition">¶</a></dt>
<dd><p>Disables authentication. Currently the default. Exists for future
compatibility and clarity.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-transitiontoauth">
<code class="descname">--transitionToAuth</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-transitiontoauth" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Allows the <strong class="program">mongod</strong> to accept and create authenticated and
non-authenticated connections to and from other <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>
and <a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances in the deployment. Used for
performing rolling transition of replica sets or sharded clusters
from a no-auth configuration to <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal authentication</span></a>. Requires specifying a <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal
authentication</span></a> mechanism such as
<a class="reference internal" href="#cmdoption-mongod-keyfile"><code class="xref std std-option docutils literal"><span class="pre">--keyFile</span></code></a>.</p>
</div>
<p>For example, if using <a class="reference internal" href="../../core/security-internal-authentication.html#internal-auth-keyfile"><span class="std std-ref">keyfiles</span></a> for
<a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal authentication</span></a>, the <strong class="program">mongod</strong> creates
an authenticated connection with any <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> or <a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>
in the deployment using a matching keyfile. If the security mechanisms do
not match, the <strong class="program">mongod</strong> utilizes a non-authenticated connection instead.</p>
<p>A <strong class="program">mongod</strong> running with <a class="reference internal" href="#cmdoption-mongod-transitiontoauth"><code class="xref std std-option docutils literal"><span class="pre">--transitionToAuth</span></code></a> does not enforce <a class="reference internal" href="../../core/authorization.html#authorization"><span class="std std-ref">user access
controls</span></a>. Users may connect to your deployment without any
access control checks and perform read, write, and administrative operations.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">A <strong class="program">mongod</strong> running with <a class="reference internal" href="../../core/security-internal-authentication.html#inter-process-auth"><span class="std std-ref">internal authentication</span></a> and <em>without</em> <a class="reference internal" href="#cmdoption-mongod-transitiontoauth"><code class="xref std std-option docutils literal"><span class="pre">--transitionToAuth</span></code></a> requires clients to connect
using <a class="reference internal" href="../../core/authorization.html#authorization"><span class="std std-ref">user access controls</span></a>. Update clients to
connect to the <strong class="program">mongod</strong> using the appropriate <a class="reference internal" href="../../core/security-users.html#users"><span class="std std-ref">user</span></a>
prior to restarting <strong class="program">mongod</strong> without <a class="reference internal" href="#cmdoption-mongod-transitiontoauth"><code class="xref std std-option docutils literal"><span class="pre">--transitionToAuth</span></code></a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-cpu">
<code class="descname">--cpu</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-cpu" title="Permalink to this definition">¶</a></dt>
<dd><p>Forces the <strong class="program">mongod</strong> process to report the percentage of CPU time in
write lock, every four seconds.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sysinfo">
<code class="descname">--sysinfo</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-sysinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns diagnostic system information and then exits. The
information provides the page size, the number of physical pages,
and the number of available physical pages.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-noscripting">
<code class="descname">--noscripting</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-noscripting" title="Permalink to this definition">¶</a></dt>
<dd><p>Disables the scripting engine.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-notablescan">
<code class="descname">--notablescan</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-notablescan" title="Permalink to this definition">¶</a></dt>
<dd><p>Forbids operations that require a collection scan. See <a class="reference internal" href="../parameters.html#param.notablescan" title="notablescan"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">notablescan</span></code></a> for additional information.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-shutdown">
<code class="descname">--shutdown</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-shutdown" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#cmdoption-mongod-shutdown"><code class="xref std std-option docutils literal"><span class="pre">--shutdown</span></code></a> option cleanly and safely terminates the <strong class="program">mongod</strong>
process. When invoking <strong class="program">mongod</strong> with this option you must set the
<a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> option either directly or by way of the
<a class="reference internal" href="../configuration-options.html"><span class="doc">configuration file</span></a> and the
<a class="reference internal" href="#cmdoption-mongod-config"><code class="xref std std-option docutils literal"><span class="pre">--config</span></code></a> option.</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-shutdown"><code class="xref std std-option docutils literal"><span class="pre">--shutdown</span></code></a> option is available only on Linux systems.</p>
<p>For additional ways to shut down, see also <a class="reference internal" href="../../tutorial/manage-mongodb-processes.html#terminate-mongod-processes"><span class="std std-ref">Stop mongod Processes</span></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-redactclientlogdata">
<code class="descname">--redactClientLogData</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-redactclientlogdata" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>A <strong class="program">mongod</strong> running with <a class="reference internal" href="#cmdoption-mongod-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> redacts any message accompanying a given
log event before logging. This prevents the <strong class="program">mongod</strong> from writing
potentially sensitive data stored on the database to the diagnostic log.
Metadata such as error or operation codes, line numbers, and source file
names are still visible in the logs.</p>
<p>Use <a class="reference internal" href="#cmdoption-mongod-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> in conjunction with
<a class="reference internal" href="../../core/security-encryption-at-rest.html"><span class="doc">Encryption at Rest</span></a> and
<a class="reference internal" href="../../core/security-transport-encryption.html"><span class="doc">TLS/SSL (Transport Encryption)</span></a> to assist compliance with
regulatory requirements.</p>
<p>For example, a MongoDB deployment might store Personally Identifiable
Information (PII) in one or more collections. The <strong class="program">mongod</strong> logs events
such as those related to CRUD operations, sharding metadata, etc. It is
possible that the <strong class="program">mongod</strong> may expose PII as a part of these logging
operations. A <strong class="program">mongod</strong> running with <a class="reference internal" href="#cmdoption-mongod-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> removes any message
accompanying these events before being output to the log, effectively
removing the PII.</p>
<p>Diagnostics on a <strong class="program">mongod</strong> running with <a class="reference internal" href="#cmdoption-mongod-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> may be more difficult
due to the lack of data related to a log event. See the
<a class="reference internal" href="../../administration/monitoring.html#monitoring-log-redaction"><span class="std std-ref">process logging</span></a> manual page for an
example of the effect of <a class="reference internal" href="#cmdoption-mongod-redactclientlogdata"><code class="xref std std-option docutils literal"><span class="pre">--redactClientLogData</span></code></a> on log output.</p>
<p>On a running <strong class="program">mongod</strong>, use <a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a> with the
<a class="reference internal" href="../parameters.html#param.redactClientLogData" title="redactClientLogData"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">redactClientLogData</span></code></a> parameter to configure this setting.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-networkmessagecompressors">
<code class="descname">--networkMessageCompressors</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-networkmessagecompressors" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: snappy,zstd,zlib</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4.</span></p>
</div>
<p>Specifies the default compressor(s) to use for
communication between this <strong class="program">mongod</strong> instance and:</p>
<ul class="simple">
<li>other members of the deployment if the instance is part of a replica set or a sharded cluster</li>
<li>a <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell</li>
<li>drivers that support the <code class="docutils literal"><span class="pre">OP_COMPRESSED</span></code> message format.</li>
</ul>
<p>MongoDB supports the following compressors:</p>
<ul class="simple">
<li><a class="reference internal" href="../glossary.html#term-snappy"><span class="xref std std-term">snappy</span></a></li>
<li><a class="reference internal" href="../glossary.html#term-zlib"><span class="xref std std-term">zlib</span></a> (Available starting in MongoDB 3.6)</li>
<li><a class="reference internal" href="../glossary.html#term-zstd"><span class="xref std std-term">zstd</span></a> (Available  starting in MongoDB 4.2)</li>
</ul>
<p><strong>In versions 3.6 and 4.0</strong>, <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> and
<a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> enable network compression by default with
<code class="docutils literal"><span class="pre">snappy</span></code> as the compressor.</p>
<p><strong>Starting in version 4.2</strong>, <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> and
<a class="reference internal" href="mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances default to both <code class="docutils literal"><span class="pre">snappy,zstd,zlib</span></code>
compressors, in that order.</p>
<p>To disable network compression, set the value to <code class="docutils literal"><span class="pre">disabled</span></code>.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">Messages are compressed when both parties enable network
compression. Otherwise, messages between the parties are
uncompressed.</p>
</div>
<p>If you specify multiple compressors, then the order in which you list
the compressors matter as well as the communication initiator. For
example, if a <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell specifies the following network
compressors <code class="docutils literal"><span class="pre">zlib,snappy</span></code> and the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> specifies
<code class="docutils literal"><span class="pre">snappy,zlib</span></code>, messages between <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell and
<a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> uses <code class="docutils literal"><span class="pre">zlib</span></code>.</p>
<p>If the parties do not share at least one common compressor, messages
between the parties are uncompressed. For example, if a
<a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell specifies the network compressor
<code class="docutils literal"><span class="pre">zlib</span></code> and <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> specifies <code class="docutils literal"><span class="pre">snappy</span></code>, messages
between <a class="reference internal" href="mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell and <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> are not compressed.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-timezoneinfo">
<code class="descname">--timeZoneInfo</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongod-timezoneinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>The full path from which to load the time zone database. If this option
is not provided, then MongoDB will use its built-in time zone database.</p>
<p>The configuration file included with Linux and macOS packages sets the time
zone database path to <code class="docutils literal"><span class="pre">/usr/share/zoneinfo</span></code> by default.</p>
<p>The built-in time zone database is a copy of the <a class="reference external" href="https://www.iana.org/time-zones">Olson/IANA time zone
database</a>. It is updated along with MongoDB
releases, but the release cycle of the time zone database differs from the
release cycle of MongoDB. A copy of the most recent release of the time zone
database can be downloaded from
<a class="reference external" href="https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip">https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip</a>.</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-sh"><div class="highlight"><pre><span></span>wget https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip
unzip timezonedb-latest.zip
mongod --timeZoneInfo timezonedb-2017b/
</pre></div>
</div>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../configuration-options.html#processManagement.timeZoneInfo" title="processManagement.timeZoneInfo"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">processManagement.timeZoneInfo</span></code></a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-serviceexecutor">
<code class="descname">--serviceExecutor</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-serviceexecutor" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: synchronous</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.6.</span></p>
</div>
<p>Determines the threading and execution model <strong class="program">mongod</strong> uses to
execute client requests. The <code class="docutils literal"><span class="pre">--serviceExecutor</span></code> option accepts one
of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">synchronous</span></code></td>
<td>The <strong class="program">mongod</strong> uses synchronous networking and manages its
networking thread pool on a per connection basis. Previous
versions of MongoDB managed threads in this way.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">adaptive</span></code></td>
<td>The <strong class="program">mongod</strong> uses the new experimental asynchronous
networking mode with an adaptive thread pool which manages
threads on a per request basis. This mode should have more
consistent performance and use less resources when there are
more inactive connections than database requests.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-outputconfig">
<code class="descname">--outputConfig</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-outputconfig" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Outputs the <strong class="program">mongod</strong> instance’s configuration options, formatted
in YAML, to <code class="docutils literal"><span class="pre">stdout</span></code> and exits the <strong class="program">mongod</strong> instance. For
configuration options that uses <a class="reference internal" href="../expansion-directives.html#externally-sourced-values"><span class="std std-ref">Externally Sourced Configuration File Values</span></a>,
<a class="reference internal" href="#cmdoption-mongod-outputconfig"><code class="xref std std-option docutils literal"><span class="pre">--outputConfig</span></code></a> returns the resolved value for those options.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This may include any configured passwords or secrets previously
obfuscated through the external source.</p>
</div>
<p>For usage examples, see:</p>
<ul class="simple">
<li><a class="reference internal" href="../expansion-directives.html#expansion-directive-output"><span class="std std-ref">Output the Configuration File with Resolved Expansion Directive Values</span></a></li>
<li><a class="reference internal" href="../../tutorial/convert-command-line-options-to-yaml.html"><span class="doc">Convert Command-Line Options to YAML</span></a></li>
</ul>
</dd></dl>

</div>
<div class="section" id="free-monitoring">
<h3>Free Monitoring<a class="headerlink" href="#free-monitoring" title="Permalink to this headline">¶</a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0.</span></p>
</div>
<dl class="option">
<dt id="cmdoption-mongod-enablefreemonitoring">
<code class="descname">--enableFreeMonitoring</code><code class="descclassname"> &lt;runtime|on|off&gt;</code><a class="headerlink" href="#cmdoption-mongod-enablefreemonitoring" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available for MongoDB Community Edition.</p>
</div>
<p>Enables or disables <a class="reference internal" href="../../administration/free-monitoring.html"><span class="doc">free MongoDB Cloud monitoring</span></a>. <a class="reference internal" href="#cmdoption-mongod-enablefreemonitoring"><code class="xref std std-option docutils literal"><span class="pre">--enableFreeMonitoring</span></code></a> accepts the following
values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">runtime</span></code></td>
<td><p class="first">Default. You can enable or disable free monitoring during
runtime.</p>
<p>To enable or disable free monitoring during runtime, see
<a class="reference internal" href="../method/db.enableFreeMonitoring.html#db.enableFreeMonitoring" title="db.enableFreeMonitoring()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.enableFreeMonitoring()</span></code></a> and
<a class="reference internal" href="../method/db.disableFreeMonitoring.html#db.disableFreeMonitoring" title="db.disableFreeMonitoring()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.disableFreeMonitoring()</span></code></a>.</p>
<p class="last">To enable or disable free monitoring during runtime when
running with access control, users must have required
privileges. See <a class="reference internal" href="../method/db.enableFreeMonitoring.html#db.enableFreeMonitoring" title="db.enableFreeMonitoring()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.enableFreeMonitoring()</span></code></a> and
<a class="reference internal" href="../method/db.disableFreeMonitoring.html#db.disableFreeMonitoring" title="db.disableFreeMonitoring()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.disableFreeMonitoring()</span></code></a> for details.</p>
</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">on</span></code></td>
<td>Enables free monitoring at startup; i.e. registers for free
monitoring. When enabled at startup, you cannot disable free
monitoring during runtime.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">off</span></code></td>
<td>Disables free monitoring at startup, regardless of whether
you have previously registered for free monitoring.  When disabled at startup,
you cannot enable free monitoring during runtime.</td>
</tr>
</tbody>
</table>
<p>Once enabled, the free monitoring state remains enabled until
explicitly disabled. That is, you do not need to re-enable each time
you start the server.</p>
<p>For the corresponding configuration file setting, see
<a class="reference internal" href="../configuration-options.html#cloud.monitoring.free.state" title="cloud.monitoring.free.state"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">cloud.monitoring.free.state</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-freemonitoringtag">
<code class="descname">--freeMonitoringTag</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-freemonitoringtag" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available for MongoDB Community Edition.</p>
</div>
<p>Optional tag to describe environment context. The tag can be sent as
part of the <a class="reference internal" href="../../administration/free-monitoring.html"><span class="doc">free MongoDB Cloud monitoring</span></a> registration at start up.</p>
<p>For the corresponding configuration file setting, see
<a class="reference internal" href="../configuration-options.html#cloud.monitoring.free.tags" title="cloud.monitoring.free.tags"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">cloud.monitoring.free.tags</span></code></a>.</p>
</dd></dl>

</div>
<div class="section" id="ldap-authentication-or-authorization-options">
<h3>LDAP Authentication or Authorization Options<a class="headerlink" href="#ldap-authentication-or-authorization-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-ldapservers">
<code class="descname">--ldapServers</code><code class="descclassname"> &lt;host1&gt;:&lt;port&gt;,&lt;host2&gt;:&lt;port&gt;,...,&lt;hostN&gt;:&lt;port&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapservers" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The LDAP server against which the <strong class="program">mongod</strong> authenticates users or
determines what actions a user is authorized to perform on a given
database. If the LDAP server specified has any replicated instances,
you may specify the host and port of each replicated server in a
comma-delimited list.</p>
<p>If your LDAP infrastructure partitions the LDAP directory over multiple LDAP
servers, specify <em>one</em> LDAP server or any of its replicated instances to
<a class="reference internal" href="#cmdoption-mongod-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">--ldapServers</span></code></a>. MongoDB supports following LDAP referrals as defined in <a class="reference external" href="https://www.rfc-editor.org/rfc/rfc4511.txt">RFC 4511
4.1.10</a>. Do not use <a class="reference internal" href="#cmdoption-mongod-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">--ldapServers</span></code></a>
for listing every LDAP server in your infrastructure.</p>
<p>This setting can be configured on a running <strong class="program">mongod</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
<p>If unset, <strong class="program">mongod</strong> cannot use <a class="reference internal" href="../../core/security-ldap.html"><span class="doc">LDAP authentication or authorization</span></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapvalidateldapserverconfig">
<code class="descname">--ldapValidateLDAPServerConfig</code><code class="descclassname"> &lt;boolean&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapvalidateldapserverconfig" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Available in MongoDB Enterprise</em></p>
<p>A flag that determines if the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance checks
the availability of the <a class="reference internal" href="#cmdoption-mongod-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">LDAP</span> <span class="pre">server(s)</span></code></a> as part of its startup:</p>
<ul class="simple">
<li>If <code class="docutils literal"><span class="pre">true</span></code>, the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance performs the
availability check and only continues to start up if the LDAP
server is available.</li>
<li>If <code class="docutils literal"><span class="pre">false</span></code>, the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance skips the
availability check; i.e. the instance starts up even if the LDAP
server is unavailable.</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapqueryuser">
<code class="descname">--ldapQueryUser</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapqueryuser" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The identity with which <strong class="program">mongod</strong> binds as, when connecting to or
performing queries on an LDAP server.</p>
<p>Only required if any of the following are true:</p>
<ul class="simple">
<li>Using <a class="reference internal" href="../../core/security-ldap-external.html#security-ldap-external"><span class="std std-ref">LDAP authorization</span></a>.</li>
<li>Using an LDAP query for <a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">username</span> <span class="pre">transformation</span></code></a>.</li>
<li>The LDAP server disallows anonymous binds</li>
</ul>
<p>You must use <a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> with <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>.</p>
<p>If unset, <strong class="program">mongod</strong> will not attempt to bind to the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongod</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Windows MongoDB deployments can use <a class="reference internal" href="#cmdoption-mongod-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a>
instead of <a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>. You cannot specify
both <a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> at the same time.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapquerypassword">
<code class="descname">--ldapQueryPassword</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapquerypassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
<p>The password used to bind to an LDAP server when using
<a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a>. You must use <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> with
<a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a>.</p>
</div>
<p>If unset, <strong class="program">mongod</strong> will not attempt to bind to the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongod</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Windows MongoDB deployments can use <a class="reference internal" href="#cmdoption-mongod-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a>
instead of <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>. You cannot specify
both <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> at the same time.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapbindwithosdefaults">
<code class="descname">--ldapBindWithOSDefaults</code><code class="descclassname"> &lt;bool&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapbindwithosdefaults" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: false</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise for the Windows platform only.</p>
</div>
<p>Allows <strong class="program">mongod</strong> to authenticate, or bind, using your Windows login
credentials when connecting to the LDAP server.</p>
<p>Only required if:</p>
<ul class="simple">
<li>Using <a class="reference internal" href="../../core/security-ldap-external.html#security-ldap-external"><span class="std std-ref">LDAP authorization</span></a>.</li>
<li>Using an LDAP query for <a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">username</span> <span class="pre">transformation</span></code></a>.</li>
<li>The LDAP server disallows anonymous binds</li>
</ul>
<p>Use <a class="reference internal" href="#cmdoption-mongod-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> to replace <a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapbindmethod">
<code class="descname">--ldapBindMethod</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapbindmethod" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: simple</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The method <strong class="program">mongod</strong> uses to authenticate to an LDAP server.
Use with <a class="reference internal" href="#cmdoption-mongod-ldapqueryuser"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryUser</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-ldapquerypassword"><code class="xref std std-option docutils literal"><span class="pre">--ldapQueryPassword</span></code></a> to
connect to the LDAP server.</p>
<p><a class="reference internal" href="#cmdoption-mongod-ldapbindmethod"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindMethod</span></code></a> supports the following values:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">simple</span></code> - <strong class="program">mongod</strong> uses simple authentication.</li>
<li><code class="docutils literal"><span class="pre">sasl</span></code> - <strong class="program">mongod</strong> uses SASL protocol for authentication</li>
</ul>
<p>If you specify <code class="docutils literal"><span class="pre">sasl</span></code>, you can configure the available SASL mechanisms
using <a class="reference internal" href="#cmdoption-mongod-ldapbindsaslmechanisms"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindSaslMechanisms</span></code></a>. <strong class="program">mongod</strong> defaults to
using <code class="docutils literal"><span class="pre">DIGEST-MD5</span></code> mechanism.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapbindsaslmechanisms">
<code class="descname">--ldapBindSaslMechanisms</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapbindsaslmechanisms" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: DIGEST-MD5</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>A comma-separated list of SASL mechanisms <strong class="program">mongod</strong> can
use when authenticating to the LDAP server. The <strong class="program">mongod</strong> and the
LDAP server must agree on at least one mechanism. The <strong class="program">mongod</strong>
dynamically loads any SASL mechanism libraries installed on the host
machine at runtime.</p>
<p>Install and configure the appropriate libraries for the selected
SASL mechanism(s) on both the <strong class="program">mongod</strong> host and the remote
LDAP server host. Your operating system may include certain SASL
libraries by default. Defer to the documentation associated with each
SASL mechanism for guidance on installation and configuration.</p>
<p>If using the <code class="docutils literal"><span class="pre">GSSAPI</span></code> SASL mechanism for use with
<a class="reference internal" href="../../core/kerberos.html#security-kerberos"><span class="std std-ref">Kerberos Authentication</span></a>, verify the following for the
<strong class="program">mongod</strong> host machine:</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">Linux</span></code></dt>
<dd><ul class="first last simple">
<li>The <code class="docutils literal"><span class="pre">KRB5_CLIENT_KTNAME</span></code> environment
variable resolves to the name of the client <a class="reference internal" href="../../core/kerberos.html#keytab-files"><span class="std std-ref">Linux Keytab Files</span></a>
for the host machine. For more on Kerberos environment
variables, please defer to the
<a class="reference external" href="https://web.mit.edu/kerberos/krb5-1.13/doc/admin/env_variables.html">Kerberos documentation</a>.</li>
<li>The client keytab includes a
<a class="reference internal" href="../../core/kerberos.html#kerberos-user-principal"><span class="std std-ref">User Principal</span></a> for the <strong class="program">mongod</strong> to use when
connecting to the LDAP server and execute LDAP queries.</li>
</ul>
</dd>
<dt><code class="docutils literal"><span class="pre">Windows</span></code></dt>
<dd>If connecting to an Active Directory server, the Windows
Kerberos configuration automatically generates a
<a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa380510(v=vs.85).aspx">Ticket-Granting-Ticket</a>
when the user logs onto the system. Set <a class="reference internal" href="#cmdoption-mongod-ldapbindwithosdefaults"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindWithOSDefaults</span></code></a> to
<code class="docutils literal"><span class="pre">true</span></code> to allow <strong class="program">mongod</strong> to use the generated credentials when
connecting to the Active Directory server and execute queries.</dd>
</dl>
<p>Set <a class="reference internal" href="#cmdoption-mongod-ldapbindmethod"><code class="xref std std-option docutils literal"><span class="pre">--ldapBindMethod</span></code></a> to <code class="docutils literal"><span class="pre">sasl</span></code> to use this option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>For a complete list of SASL mechanisms see the
<a class="reference external" href="http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml">IANA listing</a>.
Defer to the documentation for your LDAP or Active Directory
service for identifying the SASL mechanisms compatible with the
service.</p>
<p>MongoDB is not a source of SASL mechanism libraries, nor
is the MongoDB documentation a definitive source for
installing or configuring any given SASL mechanism. For
documentation and support, defer to the SASL mechanism
library vendor or owner.</p>
<p>For more information on SASL, defer to the following resources:</p>
<ul class="last simple">
<li>For Linux, please see the <a class="reference external" href="https://www.cyrusimap.org/sasl/">Cyrus SASL documentation</a>.</li>
<li>For Windows, please see the <a class="reference external" href="https://msdn.microsoft.com/en-us/library/cc223500.aspx">Windows SASL documentation</a>.</li>
</ul>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldaptransportsecurity">
<code class="descname">--ldapTransportSecurity</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldaptransportsecurity" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: tls</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>By default, <strong class="program">mongod</strong> creates a TLS/SSL secured connection to the LDAP
server.</p>
<p>For Linux deployments, you must configure the appropriate TLS Options in
<code class="docutils literal"><span class="pre">/etc/openldap/ldap.conf</span></code> file. Your operating system’s package manager
creates this file as part of the MongoDB Enterprise installation, via the
<code class="docutils literal"><span class="pre">libldap</span></code> dependency. See the documentation for <code class="docutils literal"><span class="pre">TLS</span> <span class="pre">Options</span></code> in the
<a class="reference external" href="http://www.openldap.org/software/man.cgi?query=ldap.conf&amp;manpath=OpenLDAP+2.4-Release">ldap.conf OpenLDAP documentation</a>
for more complete instructions.</p>
<p>For Windows deployment, you must add the LDAP server CA certificates to the
Windows certificate management tool. The exact name and functionality of the
tool may vary depending on operating system version. Please see the
documentation for your version of Windows for more information on
certificate management.</p>
<p>Set <a class="reference internal" href="#cmdoption-mongod-ldaptransportsecurity"><code class="xref std std-option docutils literal"><span class="pre">--ldapTransportSecurity</span></code></a> to <code class="docutils literal"><span class="pre">none</span></code> to disable TLS/SSL between <strong class="program">mongod</strong> and the LDAP
server.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Setting <a class="reference internal" href="#cmdoption-mongod-ldaptransportsecurity"><code class="xref std std-option docutils literal"><span class="pre">--ldapTransportSecurity</span></code></a> to <code class="docutils literal"><span class="pre">none</span></code> transmits plaintext information and possibly
credentials between <strong class="program">mongod</strong> and the LDAP server.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldaptimeoutms">
<code class="descname">--ldapTimeoutMS</code><code class="descclassname"> &lt;long&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldaptimeoutms" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 10000</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>The amount of time in milliseconds <strong class="program">mongod</strong> should wait for an LDAP server
to respond to a request.</p>
<p>Increasing the value of <a class="reference internal" href="#cmdoption-mongod-ldaptimeoutms"><code class="xref std std-option docutils literal"><span class="pre">--ldapTimeoutMS</span></code></a> may prevent connection failure between the
MongoDB server and the LDAP server, if the source of the failure is a
connection timeout. Decreasing the value of <a class="reference internal" href="#cmdoption-mongod-ldaptimeoutms"><code class="xref std std-option docutils literal"><span class="pre">--ldapTimeoutMS</span></code></a> reduces the time
MongoDB waits for a response from the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongod</strong> using
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapusertodnmapping">
<code class="descname">--ldapUserToDNMapping</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapusertodnmapping" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>Maps the username provided to <strong class="program">mongod</strong> for authentication to a LDAP
Distinguished Name (DN). You may need to use <a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> to transform a
username into an LDAP DN in the following scenarios:</p>
<ul class="simple">
<li>Performing LDAP authentication with simple LDAP binding, where users
authenticate to MongoDB with usernames that are not full LDAP DNs.</li>
<li>Using an <a class="reference internal" href="#cmdoption-mongod-ldapauthzquerytemplate"><code class="xref std std-option docutils literal"><span class="pre">LDAP</span> <span class="pre">authorization</span> <span class="pre">query</span> <span class="pre">template</span></code></a> that requires a DN.</li>
<li>Transforming the usernames of clients authenticating to Mongo DB using
different authentication mechanisms (e.g. x.509, kerberos) to a full LDAP
DN for authorization.</li>
</ul>
<p><a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> expects a quote-enclosed JSON-string representing an ordered array
of documents. Each document contains a regular expression <code class="docutils literal"><span class="pre">match</span></code> and
either a <code class="docutils literal"><span class="pre">substitution</span></code> or <code class="docutils literal"><span class="pre">ldapQuery</span></code> template used for transforming the
incoming username.</p>
<p>Each document in the array has the following form:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="nx">match</span><span class="o">:</span> <span class="s2">&quot;&lt;regex&gt;&quot;</span>
  <span class="nx">substitution</span><span class="o">:</span> <span class="s2">&quot;&lt;LDAP DN&gt;&quot;</span> <span class="o">|</span> <span class="nx">ldapQuery</span><span class="o">:</span> <span class="s2">&quot;&lt;LDAP Query&gt;&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="10%" />
<col width="70%" />
<col width="20%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Field</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">match</span></code></td>
<td>An ECMAScript-formatted regular expression (regex) to match against a
provided username. Each parenthesis-enclosed section represents a
regex capture group used by <code class="docutils literal"><span class="pre">substitution</span></code> or <code class="docutils literal"><span class="pre">ldapQuery</span></code>.</td>
<td><code class="docutils literal"><span class="pre">&quot;(.+)ENGINEERING&quot;</span></code>
<code class="docutils literal"><span class="pre">&quot;(.+)DBA&quot;</span></code></td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">substitution</span></code></td>
<td><p class="first">An LDAP distinguished name (DN) formatting template that converts the
authentication name matched by the <code class="docutils literal"><span class="pre">match</span></code> regex into a LDAP DN.
Each curly bracket-enclosed numeric value is replaced by the
corresponding <a class="reference external" href="http://www.regular-expressions.info/refcapture.html">regex capture group</a> extracted
from the authentication username via the <code class="docutils literal"><span class="pre">match</span></code> regex.</p>
<p class="last">The result of the substitution must be an <a class="reference external" href="https://www.ietf.org/rfc/rfc4514.txt">RFC4514</a> escaped string.</p>
</td>
<td><code class="docutils literal"><span class="pre">&quot;cn={0},ou=engineering,</span>
<span class="pre">dc=example,dc=com&quot;</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">ldapQuery</span></code></td>
<td>A LDAP query formatting template that inserts the authentication
name matched by the <code class="docutils literal"><span class="pre">match</span></code> regex into an LDAP query URI encoded
respecting RFC4515 and RFC4516. Each curly bracket-enclosed numeric
value is replaced by the corresponding <a class="reference external" href="http://www.regular-expressions.info/refcapture.html">regex capture group</a> extracted
from the authentication username via the <code class="docutils literal"><span class="pre">match</span></code> expression.
<strong class="program">mongod</strong> executes the query against the LDAP server to retrieve
the LDAP DN for the authenticated user. <strong class="program">mongod</strong> requires
exactly one returned result for the transformation to be
successful, or <strong class="program">mongod</strong> skips this transformation.</td>
<td><code class="docutils literal"><span class="pre">&quot;ou=engineering,dc=example,</span>
<span class="pre">dc=com??one?(user={0})&quot;</span></code></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">An explanation of  <a class="reference external" href="https://www.ietf.org/rfc/rfc4514.txt">RFC4514</a>,
<a class="reference external" href="https://tools.ietf.org/search/rfc4515">RFC4515</a>,
<a class="reference external" href="https://tools.ietf.org/html/rfc4516">RFC4516</a>, or LDAP queries is out
of scope for the MongoDB Documentation. Please review the RFC directly or
use your preferred LDAP resource.</p>
</div>
<p>For each document in the array, you must use either <code class="docutils literal"><span class="pre">substitution</span></code> or
<code class="docutils literal"><span class="pre">ldapQuery</span></code>. You <em>cannot</em> specify both in the same document.</p>
<p>When performing authentication or authorization, <strong class="program">mongod</strong> steps through
each document in the array in the given order, checking the authentication
username against the <code class="docutils literal"><span class="pre">match</span></code> filter.  If a match is found,
<strong class="program">mongod</strong> applies the transformation and uses the output for
authenticating the user. <strong class="program">mongod</strong> does not check the remaining documents
in the array.</p>
<p>If the given document does not match the provided authentication name, or
the transformation described by the document fails, <strong class="program">mongod</strong> continues
through the list of documents to find additional matches. If no matches are
found in any document, <strong class="program">mongod</strong> returns an error.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p>The following shows two transformation documents. The first
document matches against any string ending in <code class="docutils literal"><span class="pre">&#64;ENGINEERING</span></code>, placing
anything preceeding the suffix into a regex capture group. The
second document matches against any string ending in <code class="docutils literal"><span class="pre">&#64;DBA</span></code>, placing
anything preceeding the suffix into a regex capture group.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">You must pass the array to <a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> as a string.</p>
</div>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-text"><div class="highlight"><pre><span></span>&quot;[
   {
      match: &quot;(.+)@ENGINEERING.EXAMPLE.COM&quot;,
      substitution: &quot;cn={0},ou=engineering,dc=example,dc=com&quot;
   },
   {
      match: &quot;(.+)@DBA.EXAMPLE.COM&quot;,
      ldapQuery: &quot;ou=dba,dc=example,dc=com??one?(user={0})&quot;

   }

]&quot;
</pre></div>
</div>
</div>
<p>A user with username <code class="docutils literal"><span class="pre">alice&#64;ENGINEERING.EXAMPLE.COM</span></code> matches the first
document. The regex capture group <code class="docutils literal"><span class="pre">{0}</span></code> corresponds to the string
<code class="docutils literal"><span class="pre">alice</span></code>. The resulting output is the DN
<code class="docutils literal"><span class="pre">&quot;cn=alice,ou=engineering,dc=example,dc=com&quot;</span></code>.</p>
<p class="last">A user with username <code class="docutils literal"><span class="pre">bob&#64;DBA.EXAMPLE.COM</span></code> matches the second document.
The regex capture group <code class="docutils literal"><span class="pre">{0}</span></code> corresponds to the string <code class="docutils literal"><span class="pre">bob</span></code>.  The
resulting output is the LDAP query
<code class="docutils literal"><span class="pre">&quot;ou=dba,dc=example,dc=com??one?(user=bob)&quot;</span></code>. <strong class="program">mongod</strong> executes this
query against the LDAP server, returning the result
<code class="docutils literal"><span class="pre">&quot;cn=bob,ou=dba,dc=example,dc=com&quot;</span></code>.</p>
</div>
<p>If <a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">--ldapUserToDNMapping</span></code></a> is unset, <strong class="program">mongod</strong> applies no transformations to the username
when attempting to authenticate or authorize a user against the LDAP server.</p>
<p>This setting can be configured on a running <strong class="program">mongod</strong> using the
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a> database command.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ldapauthzquerytemplate">
<code class="descname">--ldapAuthzQueryTemplate</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-ldapauthzquerytemplate" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.4: </span>Available in MongoDB Enterprise only.</p>
</div>
<p>A relative LDAP query URL formatted conforming to <a class="reference external" href="https://tools.ietf.org/search/rfc4515">RFC4515</a> and <a class="reference external" href="https://tools.ietf.org/html/rfc4516">RFC4516</a> that <strong class="program">mongod</strong> executes to obtain
the LDAP groups to which the authenticated user belongs to. The query is
relative to the host or hosts specified in <a class="reference internal" href="#cmdoption-mongod-ldapservers"><code class="xref std std-option docutils literal"><span class="pre">--ldapServers</span></code></a>.</p>
<p>In the URL, you can use the following substituion tokens:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Substitution Token</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">{USER}</span></code></td>
<td>Substitutes the authenticated username, or the
<a class="reference internal" href="../configuration-options.html#security.ldap.userToDNMapping" title="security.ldap.userToDNMapping"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">transformed</span></code></a>
username if a <a class="reference internal" href="#cmdoption-mongod-ldapusertodnmapping"><code class="xref std std-option docutils literal"><span class="pre">username</span> <span class="pre">mapping</span></code></a> is specified.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">{PROVIDED_USER}</span></code></td>
<td><p class="first">Substitutes the supplied username, i.e. before either
authentication or <a class="reference internal" href="../configuration-options.html#security.ldap.userToDNMapping" title="security.ldap.userToDNMapping"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">LDAP</span> <span class="pre">transformation</span></code></a>.</p>
<div class="last versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p>When constructing the query URL, ensure that the order of LDAP parameters
respects RFC4516:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-shell"><div class="highlight"><pre><span></span><span class="o">[</span> dn  <span class="o">[</span> ? <span class="o">[</span>attributes<span class="o">]</span> <span class="o">[</span> ? <span class="o">[</span>scope<span class="o">]</span> <span class="o">[</span> ? <span class="o">[</span>filter<span class="o">]</span> <span class="o">[</span> ? <span class="o">[</span>Extensions<span class="o">]</span> <span class="o">]</span> <span class="o">]</span> <span class="o">]</span> <span class="o">]</span> <span class="o">]</span>
</pre></div>
</div>
</div>
<p>If your query includes an attribute, <strong class="program">mongod</strong> assumes that the query
retrieves a the DNs which this entity is member of.</p>
<p>If your query does not include an attribute, <strong class="program">mongod</strong> assumes
the query retrieves all entities which the user is member of.</p>
<p>For each LDAP DN returned by the query, <strong class="program">mongod</strong> assigns the authorized
user a corresponding role on the <code class="docutils literal"><span class="pre">admin</span></code> database. If a role on the on the
<code class="docutils literal"><span class="pre">admin</span></code> database exactly matches the DN, <strong class="program">mongod</strong> grants the user the
roles and privileges assigned to that role. See the
<a class="reference internal" href="../method/db.createRole.html#db.createRole" title="db.createRole()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.createRole()</span></code></a> method for more information on creating roles.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p>This LDAP query returns any groups listed in the LDAP user object’s
<code class="docutils literal"><span class="pre">memberOf</span></code> attribute.</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-shell"><div class="highlight"><pre><span></span><span class="s2">&quot;{USER}?memberOf?base&quot;</span>
</pre></div>
</div>
</div>
<p class="last">Your LDAP configuration may not include the <code class="docutils literal"><span class="pre">memberOf</span></code> attribute as part
of the user schema, may possess a different attribute for reporting group
membership, or may not track group membership through attributes.
Configure your query with respect to your own unique LDAP configuration.</p>
</div>
<p>If unset, <strong class="program">mongod</strong> cannot authorize users using LDAP.</p>
<p>This setting can be configured on a running <strong class="program">mongod</strong> using the
<a class="reference internal" href="../command/setParameter.html#dbcmd.setParameter" title="setParameter"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setParameter</span></code></a> database command.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">An explanation of <a class="reference external" href="https://tools.ietf.org/search/rfc4515">RFC4515</a>,
<a class="reference external" href="https://tools.ietf.org/html/rfc4516">RFC4516</a> or LDAP queries is out
of scope for the MongoDB Documentation. Please review the RFC directly or
use your preferred LDAP resource.</p>
</div>
</dd></dl>

</div>
<div class="section" id="storage-options">
<h3>Storage Options<a class="headerlink" href="#storage-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-storageengine">
<code class="descname">--storageEngine</code><code class="descclassname"> string</code><a class="headerlink" href="#cmdoption-mongod-storageengine" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: <code class="docutils literal"><span class="pre">wiredTiger</span></code></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in version 4.2, MongoDB removes the deprecated MMAPv1 storage
engine.</p>
</div>
<p>Specifies the storage engine for the <strong class="program">mongod</strong> database. Available
values include:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">wiredTiger</span></code></td>
<td>To specify the <a class="reference internal" href="../../core/wiredtiger.html"><span class="doc">WiredTiger Storage Engine</span></a>.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">inMemory</span></code></td>
<td><p class="first">To specify the <a class="reference internal" href="../../core/inmemory.html"><span class="doc">In-Memory Storage Engine</span></a>.</p>
<div class="last versionadded">
<p><span class="versionmodified">New in version 3.2: </span>Available in MongoDB Enterprise only.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p>If you attempt to start a <strong class="program">mongod</strong> with a
<a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> that contains data files produced by a
storage engine other than the one specified by <a class="reference internal" href="#cmdoption-mongod-storageengine"><code class="xref std std-option docutils literal"><span class="pre">--storageEngine</span></code></a>, <strong class="program">mongod</strong>
will refuse to start.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-dbpath">
<code class="descname">--dbpath</code><code class="descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-mongod-dbpath" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: <code class="docutils literal"><span class="pre">/data/db</span></code> on Linux and macOS, <code class="docutils literal"><span class="pre">\data\db</span></code> on Windows</p>
<p>The directory where the <strong class="program">mongod</strong> instance stores its data.</p>
<p>If using the default
<a class="reference internal" href="../configuration-options.html"><span class="doc">configuration file</span></a>
included with a package manager installation of MongoDB, the
corresponding <a class="reference internal" href="../configuration-options.html#storage.dbPath" title="storage.dbPath"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">storage.dbPath</span></code></a> setting uses a different
default.</p>
<p>The files in <a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> must correspond to the storage engine
specified in <a class="reference internal" href="#cmdoption-mongod-storageengine"><code class="xref std std-option docutils literal"><span class="pre">--storageEngine</span></code></a>. If the data files do not
correspond to <a class="reference internal" href="#cmdoption-mongod-storageengine"><code class="xref std std-option docutils literal"><span class="pre">--storageEngine</span></code></a>, <strong class="program">mongod</strong> will refuse to
start.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-directoryperdb">
<code class="descname">--directoryperdb</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-directoryperdb" title="Permalink to this definition">¶</a></dt>
<dd><p>Uses a separate directory to store data for each database. The
directories are under the <a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> directory, and each subdirectory
name corresponds to the database name.</p>
<p>Not available for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances that use the
<a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>.</p>
<p>To change the <a class="reference internal" href="#cmdoption-mongod-directoryperdb"><code class="xref std std-option docutils literal"><span class="pre">--directoryperdb</span></code></a> option for existing
deployments:</p>
<ul class="simple">
<li>For standalone instances:<ol class="arabic">
<li>Use <a class="reference internal" href="mongodump.html#bin.mongodump" title="bin.mongodump"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongodump</span></code></a> on the existing
<a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance to generate a backup.</li>
<li>Stop the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance.</li>
<li>Add the <a class="reference internal" href="#cmdoption-mongod-directoryperdb"><code class="xref std std-option docutils literal"><span class="pre">--directoryperdb</span></code></a> value <strong>and</strong>
configure a new data directory</li>
<li>Restart the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance.</li>
<li>Use <a class="reference internal" href="mongorestore.html#bin.mongorestore" title="bin.mongorestore"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongorestore</span></code></a> to populate the new data
directory.</li>
</ol>
</li>
<li>For replica sets:<ol class="arabic">
<li>Stop a secondary member.</li>
<li>Add the <a class="reference internal" href="#cmdoption-mongod-directoryperdb"><code class="xref std std-option docutils literal"><span class="pre">--directoryperdb</span></code></a> value <strong>and</strong>
configure a new data directory to that secondary member.</li>
<li>Restart that secondary.</li>
<li>Use <a class="reference internal" href="../../core/replica-set-sync.html#replica-set-initial-sync"><span class="std std-ref">initial sync</span></a> to populate
the new data directory.</li>
<li>Update remaining secondaries in the same fashion.</li>
<li>Step down the primary, and update the stepped-down member in the
same fashion.</li>
</ol>
</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-noindexbuildretry">
<code class="descname">--noIndexBuildRetry</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-noindexbuildretry" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionchanged">
<p><span class="versionmodified">Changed in version 4.0: </span><a class="reference internal" href="#cmdoption-mongod-noindexbuildretry"><code class="xref std std-option docutils literal"><span class="pre">--noIndexBuildRetry</span></code></a> cannot be used in
conjunction with <a class="reference internal" href="#cmdoption-mongod-replset"><code class="xref std std-option docutils literal"><span class="pre">--replSet</span></code></a>; i.e., you cannot
use <a class="reference internal" href="#cmdoption-mongod-noindexbuildretry"><code class="xref std std-option docutils literal"><span class="pre">--noIndexBuildRetry</span></code></a> for a <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance that is part of
a replica set.</p>
</div>
<p>Stops the <strong class="program">mongod</strong> <strong>standalone</strong> instance from rebuilding incomplete indexes on the next
start up. This applies in cases where the <strong class="program">mongod</strong> restarts after it
has shut down or stopped in the middle of an index build. In such cases,
the <strong class="program">mongod</strong> always removes any incomplete indexes, and then also, by
default, attempts to rebuild them. To stop the <strong class="program">mongod</strong> from
rebuilding incomplete indexes on start up, include this option on the
command-line.</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-noindexbuildretry"><code class="xref std std-option docutils literal"><span class="pre">--noIndexBuildRetry</span></code></a> only applies to standalones.</p>
<p>Not available for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances that use the
<a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-syncdelay">
<code class="descname">--syncdelay</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-syncdelay" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 60</p>
<p>Controls how much time can pass before MongoDB flushes data to the data
files via an <a class="reference internal" href="../glossary.html#term-fsync"><span class="xref std std-term">fsync</span></a> operation.</p>
<p><strong>Do not set this value on
production systems.</strong> In almost every situation, you should use the
default setting.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If you set <a class="reference internal" href="#cmdoption-mongod-syncdelay"><code class="xref std std-option docutils literal"><span class="pre">--syncdelay</span></code></a> to <code class="docutils literal"><span class="pre">0</span></code>, MongoDB will not sync the
memory mapped files to disk.</p>
</div>
<p>The <strong class="program">mongod</strong> process writes data very quickly to the journal and
lazily to the data files. <a class="reference internal" href="#cmdoption-mongod-syncdelay"><code class="xref std std-option docutils literal"><span class="pre">--syncdelay</span></code></a> has no effect on the
<a class="reference internal" href="../configuration-options.html#storage.journal.enabled" title="storage.journal.enabled"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">journal</span></code></a> files or <a class="reference internal" href="../../core/journaling.html"><span class="doc">journaling</span></a>,
but if <a class="reference internal" href="#cmdoption-mongod-syncdelay"><code class="xref std std-option docutils literal"><span class="pre">--syncdelay</span></code></a> is set to <code class="docutils literal"><span class="pre">0</span></code> the journal will eventually consume
all available disk space. If you set <a class="reference internal" href="#cmdoption-mongod-syncdelay"><code class="xref std std-option docutils literal"><span class="pre">--syncdelay</span></code></a> to <code class="docutils literal"><span class="pre">0</span></code> for testing
purposes, you should also set <a class="reference internal" href="#cmdoption-mongod-nojournal"><code class="xref std std-option docutils literal"><span class="pre">--nojournal</span></code></a>
to <code class="docutils literal"><span class="pre">true</span></code>.</p>
<p>The <a class="reference internal" href="../command/serverStatus.html#dbcmd.serverStatus" title="serverStatus"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">serverStatus</span></code></a> command reports the background flush
thread’s status via the <code class="xref mongodb mongodb-serverstatus docutils literal"><span class="pre">backgroundFlushing</span></code> field.</p>
<p>Not available for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances that use the
<a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-upgrade">
<code class="descname">--upgrade</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-upgrade" title="Permalink to this definition">¶</a></dt>
<dd><p>Upgrades the on-disk data format of the files specified by the
<a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> to the latest version, if needed.</p>
<p>This option only affects the operation of the <strong class="program">mongod</strong> if the data
files are in an old format.</p>
<p>In most cases you should not set this value, so you can exercise the
most control over your upgrade process. See the MongoDB release notes
for more information about the upgrade process.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-repair">
<code class="descname">--repair</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-repair" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionchanged">
<p><span class="versionmodified">Changed in version 4.0.3.</span></p>
</div>
<p>Runs a repair routine on all databases for a <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>
instance. The operation attempts to salvage corrupt data as well as
rebuilds all the indexes. The operation discards any corrupt data
that cannot be salvaged.</p>
<div class="admonition-tip admonition">
<p class="first admonition-title">Tip</p>
<p class="last">If you are running with <a class="reference internal" href="../glossary.html#term-journal"><span class="xref std std-term">journaling</span></a> enabled, there is
almost never any need to run repair since the server can use the
journal files to restore the data files to a clean state automatically.
However, you may need to run repair in cases where you need to recover
from a disk-level data corruption.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<ul class="last simple">
<li>Only use <a class="reference internal" href="#cmdoption-mongod-repair"><code class="xref std std-option docutils literal"><span class="pre">mongod</span> <span class="pre">--repair</span></code></a> if you have no other options.
The operation removes and does not save any corrupt data during
the repair process.</li>
<li>Avoid running <a class="reference internal" href="#cmdoption-mongod-repair"><code class="xref std std-option docutils literal"><span class="pre">--repair</span></code></a> against
a replica set member:<ul>
<li>To repair a <a class="reference internal" href="../glossary.html#term-replica-set"><span class="xref std std-term">replica set</span></a> member, if you have an intact
copy of your data available (e.g. a recent backup or an intact
member of the <a class="reference internal" href="../glossary.html#term-replica-set"><span class="xref std std-term">replica set</span></a>), restore from that intact
copy instead(see <a class="reference internal" href="../../tutorial/resync-replica-set-member.html"><span class="doc">Resync a Member of a Replica Set</span></a>).</li>
<li>If you do choose to run <a class="reference internal" href="#cmdoption-mongod-repair"><code class="xref std std-option docutils literal"><span class="pre">mongod</span> <span class="pre">--repair</span></code></a> against a
replica set member and the operation modifies the data or the
metadata, you must still perform a full resync in order for the
member to rejoin the replica set.</li>
</ul>
</li>
<li>Before using <a class="reference internal" href="#cmdoption-mongod-repair"><code class="xref std std-option docutils literal"><span class="pre">--repair</span></code></a>, make a backup
copy of the <a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">dbpath</span></code></a> directory.</li>
<li>If repair fails to complete for any reason, you must restart the
instance using the <a class="reference internal" href="#cmdoption-mongod-repair"><code class="xref std std-option docutils literal"><span class="pre">--repair</span></code></a> option.</li>
</ul>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-journal">
<code class="descname">--journal</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-journal" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables the durability <a class="reference internal" href="../glossary.html#term-journal"><span class="xref std std-term">journal</span></a> to ensure data files remain valid
and recoverable. This option applies only when you specify the
<a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> option. <strong class="program">mongod</strong> enables journaling by default.</p>
<p>Not available for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances that use the
<a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>.</p>
<p>If any voting member of a replica set uses the <a class="reference internal" href="../../core/inmemory.html#storage-inmemory"><span class="std std-ref">in-memory
storage engine</span></a>, you must set
<a class="reference internal" href="../replica-configuration.html#rsconf.writeConcernMajorityJournalDefault" title="writeConcernMajorityJournalDefault"><code class="xref mongodb mongodb-rsconf docutils literal"><span class="pre">writeConcernMajorityJournalDefault</span></code></a> to <code class="docutils literal"><span class="pre">false</span></code>.</p>
<p>Starting in version 4.2 (and 4.0.13 and 3.6.14 ), if a replica set
member uses the <a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>
(voting or non-voting) but the replica set has
<a class="reference internal" href="../replica-configuration.html#rsconf.writeConcernMajorityJournalDefault" title="writeConcernMajorityJournalDefault"><code class="xref mongodb mongodb-rsconf docutils literal"><span class="pre">writeConcernMajorityJournalDefault</span></code></a> set to true, the
replica set member logs a startup warning.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-nojournal">
<code class="descname">--nojournal</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-nojournal" title="Permalink to this definition">¶</a></dt>
<dd><p>Disables <a class="reference internal" href="../../core/journaling.html"><span class="doc">journaling</span></a>. <strong class="program">mongod</strong>
enables journaling by default.</p>
<p>Not available for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances that use the
<a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>.</p>
<p>Starting in MongoDB 4.0, you cannot specify <a class="reference internal" href="#cmdoption-mongod-nojournal"><code class="xref std std-option docutils literal"><span class="pre">--nojournal</span></code></a> option or <a class="reference internal" href="../configuration-options.html#storage.journal.enabled" title="storage.journal.enabled"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">storage.journal.enabled:</span>
<span class="pre">false</span></code></a> for replica set members that use the
WiredTiger storage engine.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-journalcommitinterval">
<code class="descname">--journalCommitInterval</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-journalcommitinterval" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 100</p>
<p>The maximum amount of time in milliseconds that
the <strong class="program">mongod</strong> process allows between
journal operations. Values can range from 1 to 500 milliseconds. Lower
values increase the durability of the journal, at the expense of disk
performance.</p>
<p>On WiredTiger, the default journal commit interval is 100
milliseconds. Additionally, a write that includes or implies
<code class="docutils literal"><span class="pre">j:true</span></code> will cause an immediate sync of the journal. For details
or additional conditions that affect the frequency of the sync, see
<a class="reference internal" href="../../core/journaling.html#journal-process"><span class="std std-ref">Journaling Process</span></a>.</p>
<p>Not available for <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances that use the
<a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage engine</span></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Known Issue in 4.2.0: The <a class="reference internal" href="#cmdoption-mongod-journalcommitinterval"><code class="xref std std-option docutils literal"><span class="pre">--journalCommitInterval</span></code></a> is missing in 4.2.0.</p>
</div>
</dd></dl>

</div>
<div class="section" id="wiredtiger-options">
<span id="cli-wiredtiger-options"></span><h3>WiredTiger Options<a class="headerlink" href="#wiredtiger-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-wiredtigercachesizegb">
<code class="descname">--wiredTigerCacheSizeGB</code><code class="descclassname"> &lt;float&gt;</code><a class="headerlink" href="#cmdoption-mongod-wiredtigercachesizegb" title="Permalink to this definition">¶</a></dt>
<dd><p>Defines the maximum size of the internal cache that WiredTiger will
use for all data. The memory consumed by an index build (see
<a class="reference internal" href="../parameters.html#param.maxIndexBuildMemoryUsageMegabytes" title="maxIndexBuildMemoryUsageMegabytes"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">maxIndexBuildMemoryUsageMegabytes</span></code></a>) is separate from the
WiredTiger cache memory.</p>
<p>Values can range from <code class="docutils literal"><span class="pre">0.25</span></code> GB to <code class="docutils literal"><span class="pre">10000</span></code> GB.</p>
<p>Starting in MongoDB 3.4, the default WiredTiger internal cache size is
the larger of either:</p>
<ul class="simple">
<li>50% of (RAM - 1 GB), or</li>
<li>256 MB.</li>
</ul>
<p>For example, on a system with a total of 4GB of RAM the WiredTiger
cache will use 1.5GB of RAM (<code class="docutils literal"><span class="pre">0.5</span> <span class="pre">*</span> <span class="pre">(4</span> <span class="pre">GB</span> <span class="pre">-</span> <span class="pre">1</span> <span class="pre">GB)</span> <span class="pre">=</span> <span class="pre">1.5</span> <span class="pre">GB</span></code>).
Conversely, a system with a total of 1.25 GB of RAM will allocate 256
MB to the WiredTiger cache because that is more than half of the
total RAM minus one gigabyte (<code class="docutils literal"><span class="pre">0.5</span> <span class="pre">*</span> <span class="pre">(1.25</span> <span class="pre">GB</span> <span class="pre">-</span> <span class="pre">1</span> <span class="pre">GB)</span> <span class="pre">=</span> <span class="pre">128</span> <span class="pre">MB</span> <span class="pre">&lt;</span> <span class="pre">256</span> <span class="pre">MB</span></code>).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>In some instances, such as when running in a container, the database
can have memory constraints that are lower than the total system
memory. In such instances, this memory limit, rather than the total
system memory, is used as the maximum RAM available.</p>
<p class="last">To see the memory limit, see <a class="reference internal" href="../command/hostInfo.html#hostInfo.system.memLimitMB" title="hostInfo.system.memLimitMB"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">hostInfo.system.memLimitMB</span></code></a>.</p>
</div>
<p>Avoid increasing the WiredTiger internal cache size above its
default value.</p>
<p>With WiredTiger, MongoDB utilizes both the WiredTiger internal cache
and the filesystem cache.</p>
<p>Via the filesystem cache, MongoDB automatically uses all free memory
that is not used by the WiredTiger cache or by other processes.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-wiredtigercachesizegb"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerCacheSizeGB</span></code></a> limits the size of the WiredTiger internal
cache. The operating system will use the available free memory
for filesystem cache, which allows the compressed MongoDB data
files to stay in memory. In addition, the operating system will
use any free RAM to buffer file system blocks and file system
cache.</p>
<p class="last">To accommodate the additional consumers of RAM, you may have to
decrease WiredTiger internal cache size.</p>
</div>
<p>The default WiredTiger internal cache size value assumes that there is a
single <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance per machine. If a single machine
contains multiple MongoDB instances, then you should decrease the setting to
accommodate the other <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>
instances.</p>
<p>If you run <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> in a container (e.g. <code class="docutils literal"><span class="pre">lxc</span></code>,
<code class="docutils literal"><span class="pre">cgroups</span></code>, Docker, etc.) that does <em>not</em> have access to all of the
RAM available in a system, you must set <a class="reference internal" href="#cmdoption-mongod-wiredtigercachesizegb"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerCacheSizeGB</span></code></a> to a value
less than the amount of RAM available in the container. The exact
amount depends on the other processes running in the container. See
<a class="reference internal" href="../command/hostInfo.html#hostInfo.system.memLimitMB" title="hostInfo.system.memLimitMB"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">memLimitMB</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-wiredtigermaxcacheoverflowfilesizegb">
<code class="descname">--wiredTigerMaxCacheOverflowFileSizeGB</code><code class="descclassname"> &lt;float&gt;</code><a class="headerlink" href="#cmdoption-mongod-wiredtigermaxcacheoverflowfilesizegb" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the maximum size (in GB) for the “lookaside (or cache
overflow) table” file <code class="file docutils literal"><span class="pre">WiredTigerLAS.wt</span></code>.</p>
<p>The setting can accept the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">0</span></code></td>
<td>The default value. If set to <code class="docutils literal"><span class="pre">0</span></code>, the file size is
unbounded.</td>
</tr>
<tr class="row-odd"><td>number &gt;= 0.1</td>
<td>The maximum size (in GB). If the <code class="file docutils literal"><span class="pre">WiredTigerLAS.wt</span></code>
file exceeds this size, <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> exits with a
fatal assertion. You can clear the <code class="file docutils literal"><span class="pre">WiredTigerLAS.wt</span></code>
file and restart <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>.</td>
</tr>
</tbody>
</table>
<p>To change the maximum size during runtime, use the
<a class="reference internal" href="../parameters.html#param.wiredTigerMaxCacheOverflowSizeGB" title="wiredTigerMaxCacheOverflowSizeGB"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">wiredTigerMaxCacheOverflowSizeGB</span></code></a> parameter.</p>
<p><em>Available starting in MongoDB 4.2.1 (and 4.0.12)</em></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-wiredtigerjournalcompressor">
<code class="descname">--wiredTigerJournalCompressor</code><code class="descclassname"> &lt;compressor&gt;</code><a class="headerlink" href="#cmdoption-mongod-wiredtigerjournalcompressor" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: snappy</p>
<p>Specifies the type of compression to use to compress WiredTiger
journal data.</p>
<p>Available compressors are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">none</span></code></li>
<li><a class="reference internal" href="../glossary.html#term-snappy"><span class="xref std std-term">snappy</span></a></li>
<li><a class="reference internal" href="../glossary.html#term-zlib"><span class="xref std std-term">zlib</span></a></li>
<li><a class="reference internal" href="../glossary.html#term-zstd"><span class="xref std std-term">zstd</span></a> (Available starting in MongoDB 4.2)</li>
</ul>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-wiredtigerdirectoryforindexes">
<code class="descname">--wiredTigerDirectoryForIndexes</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-wiredtigerdirectoryforindexes" title="Permalink to this definition">¶</a></dt>
<dd><p>When you start <strong class="program">mongod</strong> with <a class="reference internal" href="#cmdoption-mongod-wiredtigerdirectoryforindexes"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerDirectoryForIndexes</span></code></a>, <strong class="program">mongod</strong> stores indexes and collections in separate
subdirectories under the data (i.e. <a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a>) directory.
Specifically, <strong class="program">mongod</strong> stores the indexes in a subdirectory named
<code class="docutils literal"><span class="pre">index</span></code> and the collection data in a subdirectory named
<code class="docutils literal"><span class="pre">collection</span></code>.</p>
<p>By using a symbolic link, you can specify a different location for
the indexes. Specifically, when <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance is <strong>not</strong>
running, move the <code class="docutils literal"><span class="pre">index</span></code> subdirectory to the destination and
create a symbolic link named <code class="docutils literal"><span class="pre">index</span></code> under the data directory to
the new destination.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-wiredtigercollectionblockcompressor">
<code class="descname">--wiredTigerCollectionBlockCompressor</code><code class="descclassname"> &lt;compressor&gt;</code><a class="headerlink" href="#cmdoption-mongod-wiredtigercollectionblockcompressor" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: snappy</p>
<p>Specifies the default compression for collection data. You can
override this on a per-collection basis when creating collections.</p>
<p>Available compressors are:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">none</span></code></li>
<li><a class="reference internal" href="../glossary.html#term-snappy"><span class="xref std std-term">snappy</span></a></li>
<li><a class="reference internal" href="../glossary.html#term-zlib"><span class="xref std std-term">zlib</span></a></li>
<li><a class="reference internal" href="../glossary.html#term-zstd"><span class="xref std std-term">zstd</span></a> (Available starting MongoDB 4.2)</li>
</ul>
<p><a class="reference internal" href="#cmdoption-mongod-wiredtigercollectionblockcompressor"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerCollectionBlockCompressor</span></code></a> affects all collections created. If you change
the value of <a class="reference internal" href="#cmdoption-mongod-wiredtigercollectionblockcompressor"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerCollectionBlockCompressor</span></code></a> on an existing MongoDB deployment, all new
collections will use the specified compressor. Existing collections
will continue to use the compressor specified when they were
created, or the default compressor at that time.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-wiredtigerindexprefixcompression">
<code class="descname">--wiredTigerIndexPrefixCompression</code><code class="descclassname"> &lt;boolean&gt;</code><a class="headerlink" href="#cmdoption-mongod-wiredtigerindexprefixcompression" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: true</p>
<p>Enables or disables <a class="reference internal" href="../glossary.html#term-prefix-compression"><span class="xref std std-term">prefix compression</span></a> for index data.</p>
<p>Specify <code class="docutils literal"><span class="pre">true</span></code> for <a class="reference internal" href="#cmdoption-mongod-wiredtigerindexprefixcompression"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerIndexPrefixCompression</span></code></a> to enable <a class="reference internal" href="../glossary.html#term-prefix-compression"><span class="xref std std-term">prefix compression</span></a> for
index data, or <code class="docutils literal"><span class="pre">false</span></code> to disable prefix compression for index data.</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-wiredtigerindexprefixcompression"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerIndexPrefixCompression</span></code></a> setting affects all indexes created. If you change
the value of <a class="reference internal" href="#cmdoption-mongod-wiredtigerindexprefixcompression"><code class="xref std std-option docutils literal"><span class="pre">--wiredTigerIndexPrefixCompression</span></code></a> on an existing MongoDB deployment, all new
indexes will use prefix compression. Existing indexes
are not affected.</p>
</dd></dl>

</div>
<div class="section" id="replication-options">
<span id="cli-mongod-replica-set"></span><h3>Replication Options<a class="headerlink" href="#replication-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-replset">
<code class="descname">--replSet</code><code class="descclassname"> &lt;setname&gt;</code><a class="headerlink" href="#cmdoption-mongod-replset" title="Permalink to this definition">¶</a></dt>
<dd><p>Configures replication. Specify a replica set name as an argument to
this set. All hosts in the replica set must have the same set name.</p>
<p>Starting in MongoDB 4.0,</p>
<ul class="simple">
<li><a class="reference internal" href="#cmdoption-mongod-replset"><code class="xref std std-option docutils literal"><span class="pre">--replSet</span></code></a> cannot be used in conjunction with
<a class="reference internal" href="#cmdoption-mongod-noindexbuildretry"><code class="xref std std-option docutils literal"><span class="pre">--noIndexBuildRetry</span></code></a>.</li>
<li>For the WiredTiger storage engine, <a class="reference internal" href="#cmdoption-mongod-replset"><code class="xref std std-option docutils literal"><span class="pre">--replSet</span></code></a> cannot be used in
conjunction with <a class="reference internal" href="#cmdoption-mongod-nojournal"><code class="xref std std-option docutils literal"><span class="pre">--nojournal</span></code></a>.</li>
</ul>
<p>If your application connects to more than one replica set, each set
should have a distinct name. Some drivers group replica set
connections by replica set name.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-oplogsize">
<code class="descname">--oplogSize</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-oplogsize" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies a maximum size in megabytes for the replication operation log
(i.e., the <a class="reference internal" href="../glossary.html#term-oplog"><span class="xref std std-term">oplog</span></a>).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, the oplog can grow past its configured size
limit to avoid deleting the <a class="reference internal" href="../command/replSetGetStatus.html#replSetGetStatus.optimes.lastCommittedOpTime" title="replSetGetStatus.optimes.lastCommittedOpTime"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">majority</span> <span class="pre">commit</span> <span class="pre">point</span></code></a>.</p>
</div>
<p>By default, the <strong class="program">mongod</strong> process creates an <a class="reference internal" href="../glossary.html#term-oplog"><span class="xref std std-term">oplog</span></a> based on
the maximum amount of space available. For 64-bit systems, the oplog
is typically 5% of available disk space.</p>
<p>Once the <strong class="program">mongod</strong> has created the oplog for the first time,
changing the <a class="reference internal" href="#cmdoption-mongod-oplogsize"><code class="xref std std-option docutils literal"><span class="pre">--oplogSize</span></code></a> option will not affect the size of the oplog.</p>
<p>To change the oplog size of a running replica set member, use the
<a class="reference internal" href="../command/replSetResizeOplog.html#dbcmd.replSetResizeOplog" title="replSetResizeOplog"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">replSetResizeOplog</span></code></a> administrative command.
<a class="reference internal" href="../command/replSetResizeOplog.html#dbcmd.replSetResizeOplog" title="replSetResizeOplog"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">replSetResizeOplog</span></code></a> enables you to resize the oplog
dynamically without restarting the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> process.</p>
<p>See <a class="reference internal" href="../../core/replica-set-oplog.html#replica-set-oplog-sizing"><span class="std std-ref">Oplog Size</span></a> for more information.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-enablemajorityreadconcern">
<code class="descname">--enableMajorityReadConcern</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-enablemajorityreadconcern" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: true</p>
<p>Starting in MongoDB 3.6, MongoDB enables support for
<a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> read concern by default.</p>
<p>You can disable read concern <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> to prevent
the storage cache pressure from immobilizing a deployment with a
three-member primary-secondary-arbiter (PSA) architecture. For more
information about disabling read concern <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a>,
see <a class="reference internal" href="../read-concern-majority.html#disable-read-concern-majority"><span class="std std-ref">Disable Read Concern Majority</span></a>.</p>
<p>To disable, set <a class="reference internal" href="#cmdoption-mongod-enablemajorityreadconcern"><code class="xref std std-option docutils literal"><span class="pre">--enableMajorityReadConcern</span></code></a> to false. <a class="reference internal" href="#cmdoption-mongod-enablemajorityreadconcern"><code class="xref std std-option docutils literal"><span class="pre">--enableMajorityReadConcern</span></code></a> has no effect for
MongoDB versions: 4.0.0, 4.0.1, 4.0.2, 3.6.0.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p>In general, avoid disabling <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> read concern
unless necessary. However, if you have a three-member replica set
with a primary-secondary-arbiter (PSA) architecture or a sharded
cluster with a three-member PSA shards, disable to prevent the
storage cache pressure from immobilizing the deployment.</p>
<p>Disabling <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> read concern affects support for
<a class="reference internal" href="../../core/transactions.html"><span class="doc">transactions</span></a> on sharded clusters. Specifically:</p>
<ul class="simple">
<li>A transaction cannot use read concern <a class="reference internal" href="../read-concern-snapshot.html#readconcern.&quot;snapshot&quot;" title="&quot;snapshot&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;snapshot&quot;</span></code></a> if
the transaction involves a shard that has <a class="reference internal" href="../read-concern-majority.html#disable-read-concern-majority"><span class="std std-ref">disabled read
concern “majority”</span></a>.</li>
<li>A transaction that writes to multiple shards errors if any of the
transaction’s read or write operations involves a shard that has
disabled read concern <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a>.</li>
</ul>
<p>However, it does not affect <a class="reference internal" href="../../core/transactions.html"><span class="doc">transactions</span></a>
on replica sets. For transactions on replica sets, you can specify
read concern <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> (or <a class="reference internal" href="../read-concern-snapshot.html#readconcern.&quot;snapshot&quot;" title="&quot;snapshot&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;snapshot&quot;</span></code></a>
or <a class="reference internal" href="../read-concern-local.html#readconcern.&quot;local&quot;" title="&quot;local&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;local&quot;</span></code></a> ) for multi-document transactions even if
read concern <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> is disabled.</p>
<p class="last">Disabling <a class="reference internal" href="../read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> read concern disables support
for <a class="reference internal" href="../../changeStreams.html"><span class="doc">Change Streams</span></a> for MongoDB 4.0 and earlier. For MongoDB
4.2+, disabling read concern <code class="docutils literal"><span class="pre">&quot;majority&quot;</span></code> has no effect on change
streams availability.</p>
</div>
</dd></dl>

</div>
<div class="section" id="sharded-cluster-options">
<h3>Sharded Cluster Options<a class="headerlink" href="#sharded-cluster-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-configsvr">
<code class="descname">--configsvr</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-configsvr" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Required if starting a config server.</em></p>
<p>Declares that this <strong class="program">mongod</strong> instance serves as the <a class="reference internal" href="../../core/sharded-cluster-config-servers.html#sharded-cluster-config-server"><span class="std std-ref">config
server</span></a> of a sharded cluster. When
running with this option, clients (i.e. other cluster components)
cannot write data to any database other than <code class="docutils literal"><span class="pre">config</span></code>
and <code class="docutils literal"><span class="pre">admin</span></code>. The default port for a <strong class="program">mongod</strong> with this option is
<code class="docutils literal"><span class="pre">27019</span></code> and the default <a class="reference internal" href="#cmdoption-mongod-dbpath"><code class="xref std std-option docutils literal"><span class="pre">--dbpath</span></code></a> directory is
<code class="docutils literal"><span class="pre">/data/configdb</span></code>, unless specified.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p>Starting in 3.4, you must deploy config servers as a replica set.
The use of the deprecated mirrored <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances as
config servers (SCCC) is no longer supported.</p>
<p class="last">The replica set config servers (CSRS) must run the
<a class="reference internal" href="../../core/wiredtiger.html"><span class="doc">WiredTiger storage engine</span></a>.</p>
</div>
<p>The <a class="reference internal" href="#cmdoption-mongod-configsvr"><code class="xref std std-option docutils literal"><span class="pre">--configsvr</span></code></a> option creates a local <a class="reference internal" href="../glossary.html#term-oplog"><span class="xref std std-term">oplog</span></a>.</p>
<p>Do not use the <a class="reference internal" href="#cmdoption-mongod-configsvr"><code class="xref std std-option docutils literal"><span class="pre">--configsvr</span></code></a> option with <a class="reference internal" href="#cmdoption-mongod-shardsvr"><code class="xref std std-option docutils literal"><span class="pre">--shardsvr</span></code></a>. Config
servers cannot be a shard server.</p>
<p>Do not use the <a class="reference internal" href="#cmdoption-mongod-configsvr"><code class="xref std std-option docutils literal"><span class="pre">--configsvr</span></code></a> with the
<a class="reference internal" href="../parameters.html#param.skipShardingConfigurationChecks" title="skipShardingConfigurationChecks"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">skipShardingConfigurationChecks</span></code></a> parameter. That is, if
you are temporarily starting the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> as a
standalone for maintenance operations, include the parameter
<a class="reference internal" href="../parameters.html#param.skipShardingConfigurationChecks" title="skipShardingConfigurationChecks"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">skipShardingConfigurationChecks</span></code></a> and exclude <a class="reference internal" href="#cmdoption-mongod-configsvr"><code class="xref std std-option docutils literal"><span class="pre">--configsvr</span></code></a>.
Once maintenance has completed, remove the
<a class="reference internal" href="../parameters.html#param.skipShardingConfigurationChecks" title="skipShardingConfigurationChecks"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">skipShardingConfigurationChecks</span></code></a> parameter and restart
with <a class="reference internal" href="#cmdoption-mongod-configsvr"><code class="xref std std-option docutils literal"><span class="pre">--configsvr</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-configsvrmode">
<code class="descname">--configsvrMode</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-configsvrmode" title="Permalink to this definition">¶</a></dt>
<dd><p><strong>Available in MongoDB 3.2 version only</strong></p>
<p>If set to <code class="docutils literal"><span class="pre">sccc</span></code>, indicates that the config servers are deployed
as three mirrored <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances, even if one or more
config servers is also a member of a replica set. <code class="docutils literal"><span class="pre">configsvrMode</span></code>
only accepts the value <code class="docutils literal"><span class="pre">sccc</span></code>.</p>
<p>If unset, config servers running as replica sets expect to use the
“config server replica set” protocol for writing to config servers,
rather than the “mirrored mongod” write protocol.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-shardsvr">
<code class="descname">--shardsvr</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-shardsvr" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Required if starting a shard server.</em></p>
<p>Configures this <strong class="program">mongod</strong> instance as a shard in a
sharded cluster. The default port for these instances is
<code class="docutils literal"><span class="pre">27018</span></code>.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">Starting in MongoDB 3.6, you must deploy shards as replica sets. See the <a class="reference internal" href="#cmdoption-mongod-replset"><code class="xref std std-option docutils literal"><span class="pre">--replSet</span></code></a>
option to deploy <strong class="program">mongod</strong> as part of a replica set.</p>
</div>
<p>Do not use the <a class="reference internal" href="#cmdoption-mongod-shardsvr"><code class="xref std std-option docutils literal"><span class="pre">--shardsvr</span></code></a> with the
<a class="reference internal" href="../parameters.html#param.skipShardingConfigurationChecks" title="skipShardingConfigurationChecks"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">skipShardingConfigurationChecks</span></code></a> parameter. That is, if
you are temporarily starting the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> as a
standalone for maintenance operations, include the parameter
<a class="reference internal" href="../parameters.html#param.skipShardingConfigurationChecks" title="skipShardingConfigurationChecks"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">skipShardingConfigurationChecks</span></code></a> and exclude <a class="reference internal" href="#cmdoption-mongod-shardsvr"><code class="xref std std-option docutils literal"><span class="pre">--shardsvr</span></code></a>.
Once maintenance has completed, remove the
<a class="reference internal" href="../parameters.html#param.skipShardingConfigurationChecks" title="skipShardingConfigurationChecks"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">skipShardingConfigurationChecks</span></code></a> parameter and restart
with <a class="reference internal" href="#cmdoption-mongod-shardsvr"><code class="xref std std-option docutils literal"><span class="pre">--shardsvr</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-moveparanoia">
<code class="descname">--moveParanoia</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-moveparanoia" title="Permalink to this definition">¶</a></dt>
<dd><p>If specified, during chunk migration, a shard saves,
to the <code class="docutils literal"><span class="pre">moveChunk</span></code> directory of the <code class="docutils literal"><span class="pre">--dbpath</span></code>, all documents
migrated from that shard.</p>
<p>MongoDB does not automatically delete the data saved in the
<code class="docutils literal"><span class="pre">moveChunk</span></code> directory.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-nomoveparanoia">
<code class="descname">--noMoveParanoia</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-nomoveparanoia" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionchanged">
<p><span class="versionmodified">Changed in version 3.2: </span>Starting in 3.2, MongoDB uses <code class="docutils literal"><span class="pre">--noMoveParanoia</span></code> as the default.</p>
</div>
<p>During chunk migration, a shard does not save documents migrated from
the shard.</p>
</dd></dl>

</div>
<div class="section" id="tls-options">
<span id="tls-mongod-options"></span><h3>TLS Options<a class="headerlink" href="#tls-options" title="Permalink to this headline">¶</a></h3>
<div class="admonition-see admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> for full
documentation of MongoDB’s support.</p>
</div>
<dl class="option">
<dt id="cmdoption-mongod-tlsmode">
<code class="descname">--tlsMode</code><code class="descclassname"> &lt;mode&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlsmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Enables TLS used for all network connections. The
argument to the <a class="reference internal" href="#cmdoption-mongod-tlsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsMode</span></code></a> option can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">disabled</span></code></td>
<td>The server does not use TLS.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">allowTLS</span></code></td>
<td>Connections between servers do not use TLS. For incoming
connections, the server accepts both TLS and non-TLS.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">preferTLS</span></code></td>
<td>Connections between servers use TLS. For incoming
connections, the server accepts both TLS and non-TLS.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">requireTLS</span></code></td>
<td>The server uses and accepts only TLS encrypted connections.</td>
</tr>
</tbody>
</table>
<p>If <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code> is not
specified and you are not using x.509 authentication, the
system-wide CA certificate store will be used when connecting to an
TLS-enabled server.</p>
<p>If using x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code>
must be specified unless using <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlscertificatekeyfile">
<code class="descname">--tlsCertificateKeyFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlscertificatekeyfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains both the TLS
certificate and key.</p>
</div>
<p>Starting with MongoDB 4.0 on macOS or Windows, you can use the
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> option to specify a
certificate from the operating system’s secure certificate store
instead of a PEM key file. <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> options are mutually exclusive.
You can only specify one.</p>
<ul>
<li><p class="first">On Linux/BSD, you must specify <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>
when TLS/SSL is enabled.</p>
</li>
<li><p class="first">On Windows or macOS, you must specify either
<a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> or
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> when TLS/SSL is enabled.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">For Windows <strong>only</strong>, MongoDB 4.0 and later do not support
encrypted PEM files. The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails to start if
it encounters an encrypted PEM file. To securely store and
access a certificate for use with TLS on Windows,
use <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
</div>
</li>
</ul>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlscertificatekeyfilepassword">
<code class="descname">--tlsCertificateKeyFilePassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlscertificatekeyfilepassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the password to de-crypt the certificate-key file (i.e.
<a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>). Use the
<a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> option only if the
certificate-key file is encrypted. In all cases, the
<strong class="program">mongod</strong> will redact the password from all logging and
reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the PEM file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS, if the private key in the PEM file is
encrypted, you must explicitly specify the
<a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> option. Alternatively,
you can use a certificate from the secure system store (see
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>) instead of a PEM file or use an
unencrypted PEM file.</li>
<li>On Windows, MongoDB does not support encrypted certificates.
The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails if it encounters an encrypted
PEM file. Use <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> instead.</li>
</ul>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-clusterauthmode">
<code class="descname">--clusterAuthMode</code><code class="descclassname"> &lt;option&gt;</code><a class="headerlink" href="#cmdoption-mongod-clusterauthmode" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: keyFile</p>
<p>The authentication mode used for cluster authentication. If you use
<a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html#x509-internal-authentication"><span class="std std-ref">internal x.509 authentication</span></a>,
specify so here. This option can have one of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">keyFile</span></code></td>
<td>Use a keyfile for authentication.
Accept only keyfiles.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">sendKeyFile</span></code></td>
<td>For rolling upgrade purposes. Send a keyfile for
authentication but can accept both keyfiles and x.509
certificates.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">sendX509</span></code></td>
<td>For rolling upgrade purposes. Send the x.509 certificate for
authentication but can accept both keyfiles and x.509
certificates.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">x509</span></code></td>
<td>Recommended. Send the x.509 certificate for authentication and
accept only x.509 certificates.</td>
</tr>
</tbody>
</table>
<p>If <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code> is not
specified and you are not using x.509 authentication, the
system-wide CA certificate store will be used when connecting to an
TLS-enabled server.</p>
<p>If using x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code>
must be specified unless using <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsclusterfile">
<code class="descname">--tlsClusterFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlsclusterfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the x.509
certificate-key file for <a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html#x509-internal-authentication"><span class="std std-ref">membership authentication</span></a> for the cluster or replica set.</p>
</div>
<p>Starting with MongoDB 4.0 on macOS or Windows, you can use the
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> option to specify a
certificate from the operating system’s secure certificate store
instead of a PEM key file. <a class="reference internal" href="#cmdoption-mongod-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> options are mutually
exclusive. You can only specify one.</p>
<p>If <a class="reference internal" href="#cmdoption-mongod-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> does not specify the <code class="docutils literal"><span class="pre">.pem</span></code> file for
internal cluster authentication or the alternative
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>, the cluster uses the
<code class="docutils literal"><span class="pre">.pem</span></code> file specified in the <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>
option or the certificate returned by the
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>If using x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">tls.CAFile</span></code>
must be specified unless using <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">For Windows <strong>only</strong>, MongoDB 4.0 and later do not support
encrypted PEM files. The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails to start if
it encounters an encrypted PEM file. To securely store and
access a certificate for use with membership authentication on
Windows, use <a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlscertificateselector">
<code class="descname">--tlsCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlscertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>.</p>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store to use
for TLS.</p>
<p>The <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> options are mutually exclusive.
You can only specify one.</p>
</div>
<p><a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> accepts an argument of the format
<code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code> where the property can be one of the
following:</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<p>When using the system SSL certificate store, OCSP (Online
Certificate Status Protocol) is used to validate the revocation
status of certificates.</p>
<p>The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> searches the operating system’s secure
certificate store for the CA certificates required to validate the
full certificate chain of the specified TLS certificate.
Specifically, the secure certificate store must contain the root CA
and any intermediate CA certificates required to build the full
certificate chain to the TLS certificate. Do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> or <a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> to specify the
root and intermediate CA certificate</p>
<p>For example, if the TLS/SSL certificate was signed with a single root
CA certificate, the secure certificate store must contain that root
CA certificate. If the TLS/SSL certificate was signed with an
intermediate CA certificate, the secure certificate store must
contain the intermedia CA certificate <em>and</em> the root CA certificate.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsclustercertificateselector">
<code class="descname">--tlsClusterCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlsclustercertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongod-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a>.</p>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store to use
for <a class="reference internal" href="../../core/security-internal-authentication.html#internal-auth-x509"><span class="std std-ref">internal x.509 membership authentication</span></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongod-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> options are mutually
exclusive. You can only specify one.</p>
</div>
<p><a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> accepts an argument of the
format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code> where the property can be one of the
following:</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<p>The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> searches the operating system’s secure
certificate store for the CA certificates required to validate the
full certificate chain of the specified cluster certificate.
Specifically, the secure certificate store must contain the root CA
and any intermediate CA certificates required to build the full
certificate chain to the cluster certificate. Do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> or <a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> to specify the
root and intermediate CA certificate.</p>
<p>For example, if the cluster certificate was signed with a single root
CA certificate, the secure certificate store must contain that root
CA certificate. If the cluster certificate was signed with an
intermediate CA certificate, the secure certificate store must
contain the intermedia CA certificate <em>and</em> the root CA certificate.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsclusterpassword">
<code class="descname">--tlsClusterPassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlsclusterpassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2: </span>Specifies the password to de-crypt the x.509 certificate-key file
specified with <a class="reference internal" href="#cmdoption-mongod-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a>. Use the
<a class="reference internal" href="#cmdoption-mongod-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> option only if the certificate-key
file is encrypted. In all cases, the <strong class="program">mongod</strong> will redact
the password from all logging and reporting output.</p>
</div>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the x.509 file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongod-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> option,
MongoDB will prompt for a passphrase. See
<a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS, if the private key in the x.509 file is
encrypted, you must explicitly specify the
<a class="reference internal" href="#cmdoption-mongod-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> option. Alternatively, you can
either use a certificate from the secure system store (see
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>) instead of a cluster PEM
file or use an unencrypted PEM file.</li>
<li>On Windows, MongoDB does not support encrypted certificates.
The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails if it encounters an encrypted
PEM file. Use <a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> instead.</li>
</ul>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlscafile">
<code class="descname">--tlsCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlscafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate
chain from the Certificate Authority. Specify the file name of the
<code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.</p>
<dl class="docutils">
<dt>Windows/macOS Only</dt>
<dd>If using <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>, do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> to specify the root and intermediate CA
certificates. Store all CA certificates required to validate the
full trust chain of the <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> certificates in the
secure certificate store.</dd>
</dl>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsclustercafile">
<code class="descname">--tlsClusterCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlsclustercafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate
chain from the Certificate Authority used to validate the certificate
presented by a client establishing a connection. Specify the file
name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.
<a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> requires that
<a class="reference internal" href="#cmdoption-mongod-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> is set.</p>
<p>If <a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> does not specify the <code class="file docutils literal"><span class="pre">.pem</span></code>
file for validating the certificate from a client establishing a
connection, the cluster uses the <code class="file docutils literal"><span class="pre">.pem</span></code> file specified in the
<a class="reference internal" href="#cmdoption-mongod-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> option.</p>
<p><a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> lets you use separate Certificate
Authorities to verify the client to server and server to client
portions of the TLS handshake.</p>
<dl class="docutils">
<dt>Windows/macOS Only</dt>
<dd>If using <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a>, do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> to specify the root and
intermediate CA certificates. Store all CA certificates required to
validate the full trust chain of the
<a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> certificates in the
secure certificate store.</dd>
</dl>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlscrlfile">
<code class="descname">--tlsCRLFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlscrlfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Specifies the the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the Certificate Revocation
List. Specify the file name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or
absolute paths.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, you cannot specify <a class="reference internal" href="#cmdoption-mongod-tlscrlfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCRLFile</span></code></a> on macOS.  Use <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> instead.</p>
</div>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsallowinvalidcertificates">
<code class="descname">--tlsAllowInvalidCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-tlsallowinvalidcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Bypasses the validation checks for TLS certificates on other
servers in the cluster and allows the use of invalid certificates to
connect.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you specify
<code class="docutils literal"><span class="pre">--tlsAllowInvalidCertificates</span></code> or <code class="docutils literal"><span class="pre">tls.allowInvalidCertificates:</span>
<span class="pre">true</span></code> when using x.509 authentication, an invalid certificate is
only sufficient to establish a TLS connection but is
<em>insufficient</em> for authentication.</p>
</div>
<p>When using
the <a class="reference internal" href="#cmdoption-mongod-tlsallowinvalidcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowInvalidCertificates</span></code></a> setting, MongoDB
logs a warning regarding the use of the invalid certificate.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsallowinvalidhostnames">
<code class="descname">--tlsAllowInvalidHostnames</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-tlsallowinvalidhostnames" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Disables the validation of the hostnames in TLS certificates,
when connecting to other members of the replica set or sharded cluster
for inter-process authentication. This allows <strong class="program">mongod</strong> to connect
to other members if the hostnames in their certificates do not match
their configured hostname.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsallowconnectionswithoutcertificates">
<code class="descname">--tlsAllowConnectionsWithoutCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-tlsallowconnectionswithoutcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>For clients that do not present certificates, <strong class="program">mongod</strong> bypasses
TLS/SSL certificate validation when establishing the connection.</p>
<p>For clients that present a certificate, however, <strong class="program">mongod</strong> performs
certificate validation using the root certificate chain specified by
<code class="docutils literal"><span class="pre">--tlsCAFile</span></code> and reject clients with invalid certificates.</p>
<p>Use the <a class="reference internal" href="#cmdoption-mongod-tlsallowconnectionswithoutcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowConnectionsWithoutCertificates</span></code></a> option if you have a mixed deployment that includes
clients that do not or cannot present certificates to the <strong class="program">mongod</strong>.</p>
<p>For more information about TLS and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsdisabledprotocols">
<code class="descname">--tlsDisabledProtocols</code><code class="descclassname"> &lt;protocol(s)&gt;</code><a class="headerlink" href="#cmdoption-mongod-tlsdisabledprotocols" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Prevents a MongoDB server running with TLS from accepting
incoming connections that use a specific protocol or protocols. To
specify multiple protocols, use a comma separated list of protocols.</p>
<p><a class="reference internal" href="#cmdoption-mongod-tlsdisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--tlsDisabledProtocols</span></code></a> recognizes the following protocols: <code class="docutils literal"><span class="pre">TLS1_0</span></code>, <code class="docutils literal"><span class="pre">TLS1_1</span></code>,
<code class="docutils literal"><span class="pre">TLS1_2</span></code>, and <code class="docutils literal"><span class="pre">TLS1_3</span></code>.</p>
<ul class="simple">
<li>On macOS, you cannot disable <code class="docutils literal"><span class="pre">TLS1_1</span></code> and leave both <code class="docutils literal"><span class="pre">TLS1_0</span></code> and
<code class="docutils literal"><span class="pre">TLS1_2</span></code> enabled. You must disable at least one of the other
two, for example, <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>To list multiple protocols, specify as a comma separated list of
protocols. For example <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>Specifying an unrecognized protocol will prevent the server from
starting.</li>
<li>The specified disabled protocols overrides any default disabled
protocols.</li>
</ul>
<p>Starting in version 4.0, MongoDB disables the use of TLS 1.0 if TLS
1.1+ is available on the system. To enable the disabled TLS 1.0,
specify <code class="docutils literal"><span class="pre">none</span></code> to <a class="reference internal" href="#cmdoption-mongod-tlsdisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--tlsDisabledProtocols</span></code></a>. See <a class="reference internal" href="../../release-notes/4.0.html#disable-tls"><span class="std std-ref">Disable TLS 1.0</span></a>.</p>
<p>Members of replica sets and sharded clusters must speak at least one
protocol in common.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-disallow-protocols"><span class="std std-ref">Disallow Protocols</span></a></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-tlsfipsmode">
<code class="descname">--tlsFIPSMode</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-tlsfipsmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Directs the <strong class="program">mongod</strong> to use the FIPS mode of the  TLS
library. Your system must have a FIPS
compliant library to use the <a class="reference internal" href="#cmdoption-mongod-tlsfipsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsFIPSMode</span></code></a> option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">FIPS-compatible TLS/SSL is
available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>. See
<a class="reference internal" href="../../tutorial/configure-fips.html"><span class="doc">Configure MongoDB for FIPS</span></a> for more information.</p>
</div>
</dd></dl>

</div>
<div class="section" id="ssl-options-deprecated">
<span id="ssl-mongod-options"></span><h3>SSL Options (Deprecated)<a class="headerlink" href="#ssl-options-deprecated" title="Permalink to this headline">¶</a></h3>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">All SSL options are deprecated since 4.2. Use the <a class="reference internal" href="#tls-mongod-options"><span class="std std-ref">TLS counterparts</span></a> instead, as they have identical functionality to the
SSL options.  The SSL protocol is deprecated and MongoDB supports TLS 1.0
and later.</p>
</div>
<div class="admonition-see admonition">
<p class="first admonition-title">See</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> for full
documentation of MongoDB’s support.</p>
</div>
<dl class="option">
<dt id="cmdoption-mongod-sslonnormalports">
<code class="descname">--sslOnNormalPorts</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-sslonnormalports" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 2.6: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsMode</span> <span class="pre">requireTLS</span></code></a> instead.</p>
</div>
<p>Enables TLS/SSL for <strong class="program">mongod</strong>.</p>
<p>With <a class="reference internal" href="#cmdoption-mongod-sslonnormalports"><code class="xref std std-option docutils literal"><span class="pre">--sslOnNormalPorts</span></code></a>, a <strong class="program">mongod</strong> requires TLS/SSL encryption for all
connections on the default MongoDB port, or the port specified by
<a class="reference internal" href="#cmdoption-mongod-port"><code class="xref std std-option docutils literal"><span class="pre">--port</span></code></a>. By default, <a class="reference internal" href="#cmdoption-mongod-sslonnormalports"><code class="xref std std-option docutils literal"><span class="pre">--sslOnNormalPorts</span></code></a> is
disabled.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslmode">
<code class="descname">--sslMode</code><code class="descclassname"> &lt;mode&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsMode</span></code></a> instead.</p>
</div>
<p>Enables TLS/SSL or mixed TLS/SSL used for all network connections. The
argument to the <a class="reference internal" href="#cmdoption-mongod-sslmode"><code class="xref std std-option docutils literal"><span class="pre">--sslMode</span></code></a> option can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">disabled</span></code></td>
<td>The server does not use TLS/SSL.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">allowSSL</span></code></td>
<td>Connections between servers do not use TLS/SSL. For incoming
connections, the server accepts both TLS/SSL and non-TLS/non-SSL.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">preferSSL</span></code></td>
<td>Connections between servers use TLS/SSL. For incoming
connections, the server accepts both TLS/SSL and non-TLS/non-SSL.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">requireSSL</span></code></td>
<td>The server uses and accepts only TLS/SSL encrypted connections.</td>
</tr>
</tbody>
</table>
<p>Starting in version 3.4, if <code class="docutils literal"><span class="pre">--tlsCAFile</span></code>/<code class="docutils literal"><span class="pre">net.tls.CAFile</span></code> (or
their aliases <code class="docutils literal"><span class="pre">--sslCAFile</span></code>/<code class="docutils literal"><span class="pre">net.ssl.CAFile</span></code>) is not specified
and you are not using x.509 authentication, the system-wide CA
certificate store will be used when connecting to an TLS/SSL-enabled
server.</p>
<p>To use x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">net.tls.CAFile</span></code>
must be specified unless using <code class="docutils literal"><span class="pre">--tlsCertificateSelector</span></code> or
<code class="docutils literal"><span class="pre">--net.tls.certificateSelector</span></code>. Or if using the <code class="docutils literal"><span class="pre">ssl</span></code> aliases,
<code class="docutils literal"><span class="pre">--sslCAFile</span></code> or <code class="docutils literal"><span class="pre">net.ssl.CAFile</span></code> must be specified unless using
<code class="docutils literal"><span class="pre">--sslCertificateSelector</span></code> or <code class="docutils literal"><span class="pre">net.ssl.certificateSelector</span></code>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslpemkeyfile">
<code class="descname">--sslPEMKeyFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslpemkeyfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a> instead.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains both the TLS/SSL
certificate and key.</p>
<p>Starting with MongoDB 4.0 on macOS or Windows, you can use the
<a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> option to specify a
certificate from the operating system’s secure certificate store
instead of a PEM key file. <a class="reference internal" href="#cmdoption-mongod-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> options are mutually exclusive.
You can only specify one.</p>
<ul>
<li><p class="first">On Linux/BSD, you must specify <a class="reference internal" href="#cmdoption-mongod-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> when
TLS/SSL is enabled.</p>
</li>
<li><p class="first">On Windows or macOS, you must specify either
<a class="reference internal" href="#cmdoption-mongod-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> or <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>
when TLS/SSL is enabled.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">For Windows <strong>only</strong>, MongoDB 4.0 and later do not support
encrypted PEM files. The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails to start if
it encounters an encrypted PEM file. To securely store and
access a certificate for use with TLS/SSL on Windows,
use <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>.</p>
</div>
</li>
</ul>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslpemkeypassword">
<code class="descname">--sslPEMKeyPassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslpemkeypassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfilepassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFilePassword</span></code></a> instead.</p>
</div>
<p>Specifies the password to de-crypt the certificate-key file (i.e.
<a class="reference internal" href="#cmdoption-mongod-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a>). Use the <a class="reference internal" href="#cmdoption-mongod-sslpemkeypassword"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyPassword</span></code></a> option only if the
certificate-key file is encrypted. In all cases, the <strong class="program">mongod</strong> will
redact the password from all logging and reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the PEM file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongod-sslpemkeypassword"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyPassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS, if the private key in the PEM file is
encrypted, you must explicitly specify the
<a class="reference internal" href="#cmdoption-mongod-sslpemkeypassword"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyPassword</span></code></a> option. Alternatively, you can use a
certificate from the secure system store (see
<a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>) instead of a PEM key file or
use an unencrypted PEM file.</li>
<li>On Windows, MongoDB does not support encrypted certificates.
The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails if it encounters an encrypted
PEM file. Use <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> instead.</li>
</ul>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslclusterfile">
<code class="descname">--sslClusterFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslclusterfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterFile</span></code></a> instead.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the x.509
certificate-key file for <a class="reference internal" href="../../tutorial/configure-x509-member-authentication.html#x509-internal-authentication"><span class="std std-ref">membership authentication</span></a> for the cluster or replica set.</p>
<p>Starting with MongoDB 4.0 on macOS or Windows, you can use the
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> option to specify a
certificate from the operating system’s secure certificate store
instead of a PEM key file. <a class="reference internal" href="#cmdoption-mongod-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> options are mutually
exclusive. You can only specify one.</p>
<p>If <a class="reference internal" href="#cmdoption-mongod-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a> does not specify the <code class="docutils literal"><span class="pre">.pem</span></code> file for
internal cluster authentication or the alternative
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>, the cluster uses the
<code class="docutils literal"><span class="pre">.pem</span></code> file specified in the <a class="reference internal" href="#cmdoption-mongod-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> option or
the certificate returned by the <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>.</p>
<p>To use x.509 authentication, <code class="docutils literal"><span class="pre">--tlsCAFile</span></code> or <code class="docutils literal"><span class="pre">net.tls.CAFile</span></code>
must be specified unless using <code class="docutils literal"><span class="pre">--tlsCertificateSelector</span></code> or
<code class="docutils literal"><span class="pre">--net.tls.certificateSelector</span></code>. Or if using the <code class="docutils literal"><span class="pre">ssl</span></code> aliases,
<code class="docutils literal"><span class="pre">--sslCAFile</span></code> or <code class="docutils literal"><span class="pre">net.ssl.CAFile</span></code> must be specified unless using
<code class="docutils literal"><span class="pre">--sslCertificateSelector</span></code> or <code class="docutils literal"><span class="pre">net.ssl.certificateSelector</span></code>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">For Windows <strong>only</strong>, MongoDB 4.0 and later do not support
encrypted PEM files. The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails to start if
it encounters an encrypted PEM file. To securely store and
access a certificate for use with membership authentication on
Windows, use <a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslcertificateselector">
<code class="descname">--sslCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslcertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlscertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateSelector</span></code></a> instead.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongod-tlscertificatekeyfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCertificateKeyFile</span></code></a>.</p>
<p>Specifies a certificate property to select a matching certificate
from the operating system’s secure certificate store to use for
TLS/SSL.</p>
<p><a class="reference internal" href="#cmdoption-mongod-sslpemkeyfile"><code class="xref std std-option docutils literal"><span class="pre">--sslPEMKeyFile</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>
options are mutually exclusive. You can only specify one.</p>
</div>
<p><a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> accepts an argument of the format
<code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code> where the property can be one of the
following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<p>When using the system SSL certificate store, OCSP (Online
Certificate Status Protocol) is used to validate the revocation
status of certificates.</p>
<p>The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> searches the operating system’s secure
certificate store for the CA certificates required to validate the
full certificate chain of the specified TLS/SSL certificate.
Specifically, the secure certificate store must contain the root CA
and any intermediate CA certificates required to build the full
certificate chain to the TLS/SSL certificate. Do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> or <a class="reference internal" href="#cmdoption-mongod-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> to specify the
root and intermediate CA certificate</p>
<p>For example, if the TLS/SSL certificate was signed with a single root
CA certificate, the secure certificate store must contain that root
CA certificate. If the TLS/SSL certificate was signed with an
intermediate CA certificate, the secure certificate store must
contain the intermedia CA certificate <em>and</em> the root CA certificate.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslclustercertificateselector">
<code class="descname">--sslClusterCertificateSelector</code><code class="descclassname"> &lt;parameter&gt;=&lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslclustercertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCertificateSelector</span></code></a> instead.</p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongod-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a>.</p>
<p>Specifies a certificate property to select a matching certificate
from the operating system’s secure certificate store to use for
<a class="reference internal" href="../../core/security-internal-authentication.html#internal-auth-x509"><span class="std std-ref">internal x.509 membership authentication</span></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongod-sslclusterfile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterFile</span></code></a> and
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> options are mutually
exclusive. You can only specify one.</p>
</div>
<p><a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> accepts an argument of the
format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code> where the property can be one of the
following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<p>The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> searches the operating system’s secure
certificate store for the CA certificates required to validate the
full certificate chain of the specified cluster certificate.
Specifically, the secure certificate store must contain the root CA
and any intermediate CA certificates required to build the full
certificate chain to the cluster certificate. Do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> or <a class="reference internal" href="#cmdoption-mongod-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> to specify the
root and intermediate CA certificate.</p>
<p>For example, if the cluster certificate was signed with a single root
CA certificate, the secure certificate store must contain that root
CA certificate. If the cluster certificate was signed with an
intermediate CA certificate, the secure certificate store must
contain the intermedia CA certificate <em>and</em> the root CA certificate.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslclusterpassword">
<code class="descname">--sslClusterPassword</code><code class="descclassname"> &lt;value&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslclusterpassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterPassword</span></code></a> instead.</p>
</div>
<p>Specifies the password to de-crypt the x.509 certificate-key file
specified with <code class="docutils literal"><span class="pre">--sslClusterFile</span></code>. Use the <a class="reference internal" href="#cmdoption-mongod-sslclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterPassword</span></code></a> option only
if the certificate-key file is encrypted. In all cases, the <strong class="program">mongod</strong>
will redact the password from all logging and reporting output.</p>
<p>Starting in MongoDB 4.0:</p>
<ul class="simple">
<li>On Linux/BSD, if the private key in the x.509 file is encrypted and
you do not specify the <a class="reference internal" href="#cmdoption-mongod-sslclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterPassword</span></code></a> option, MongoDB will prompt for a
passphrase. See <a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-certificate-password"><span class="std std-ref">TLS/SSL Certificate Passphrase</span></a>.</li>
<li>On macOS, if the private key in the x.509 file is encrypted, you
must explicitly specify the <a class="reference internal" href="#cmdoption-mongod-sslclusterpassword"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterPassword</span></code></a> option.
Alternatively, you can either use a certificate from the secure
system store (see <a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>)
instead of a cluster PEM file or use an unencrypted PEM file.</li>
<li>On Windows, MongoDB does not support encrypted certificates.
The <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> fails if it encounters an encrypted
PEM file. Use <a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> instead.</li>
</ul>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslcafile">
<code class="descname">--sslCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslcafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlscafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCAFile</span></code></a> instead.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate
chain from the Certificate Authority. Specify the file name of the
<code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.</p>
<dl class="docutils">
<dt>Windows/macOS Only</dt>
<dd>If using <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>, do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> to specify the root and intermediate CA
certificates. Store all CA certificates required to validate the
full trust chain of the <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> certificates in the
secure certificate store.</dd>
</dl>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslclustercafile">
<code class="descname">--sslClusterCAFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslclustercafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--tlsClusterCAFile</span></code></a> instead.</p>
</div>
<p>Specifies the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the root certificate
chain from the Certificate Authority used to validate the certificate
presented by a client establishing a connection. Specify the file
name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or absolute paths.
<a class="reference internal" href="#cmdoption-mongod-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> requires that
<a class="reference internal" href="#cmdoption-mongod-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> is set.</p>
<p>If <a class="reference internal" href="#cmdoption-mongod-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> does not specify the <code class="file docutils literal"><span class="pre">.pem</span></code>
file for validating the certificate from a client establishing a
connection, the cluster uses the <code class="file docutils literal"><span class="pre">.pem</span></code> file specified in the
<a class="reference internal" href="#cmdoption-mongod-sslcafile"><code class="xref std std-option docutils literal"><span class="pre">--sslCAFile</span></code></a> option.</p>
<p><a class="reference internal" href="#cmdoption-mongod-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> lets you use separate Certificate
Authorities to verify the client to server and server to client
portions of the TLS handshake.</p>
<dl class="docutils">
<dt>Windows/macOS Only</dt>
<dd>If using <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a>, do <strong>not</strong> use
<a class="reference internal" href="#cmdoption-mongod-sslclustercafile"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCAFile</span></code></a> to specify the root and
intermediate CA certificates. Store all CA certificates required to
validate the full trust chain of the
<a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> and/or
<a class="reference internal" href="#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> certificates in the
secure certificate store.</dd>
</dl>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslcrlfile">
<code class="descname">--sslCRLFile</code><code class="descclassname"> &lt;filename&gt;</code><a class="headerlink" href="#cmdoption-mongod-sslcrlfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlscrlfile"><code class="xref std std-option docutils literal"><span class="pre">--tlsCRLFile</span></code></a> instead.</p>
</div>
<p>Specifies the the <code class="file docutils literal"><span class="pre">.pem</span></code> file that contains the Certificate Revocation
List. Specify the file name of the <code class="file docutils literal"><span class="pre">.pem</span></code> file using relative or
absolute paths.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, you cannot specify <a class="reference internal" href="#cmdoption-mongod-sslcrlfile"><code class="xref std std-option docutils literal"><span class="pre">--sslCRLFile</span></code></a> on macOS.  Use <a class="reference internal" href="#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a> instead.</p>
</div>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslallowinvalidcertificates">
<code class="descname">--sslAllowInvalidCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-sslallowinvalidcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsallowinvalidcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowInvalidCertificates</span></code></a> instead.</p>
</div>
<p>Bypasses the validation checks for TLS/SSL certificates on other
servers in the cluster and allows the use of invalid certificates to
connect.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in MongoDB 4.0, if you specify
<code class="docutils literal"><span class="pre">--sslAllowInvalidCertificates</span></code> or
<code class="docutils literal"><span class="pre">net.ssl.allowInvalidCertificates:</span> <span class="pre">true</span></code> (or in MongoDB 4.2, the
alias <code class="docutils literal"><span class="pre">--tlsAllowInvalidateCertificates</span></code> or
<code class="docutils literal"><span class="pre">net.tls.allowInvalidCertificates:</span> <span class="pre">true</span></code>) when using x.509
authentication, an invalid certificate is only sufficient to
establish a TLS/SSL connection but is <em>insufficient</em> for
authentication.</p>
</div>
<p>When using
the <a class="reference internal" href="#cmdoption-mongod-sslallowinvalidcertificates"><code class="xref std std-option docutils literal"><span class="pre">--sslAllowInvalidCertificates</span></code></a> setting, MongoDB
logs a warning regarding the use of the invalid certificate.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslallowinvalidhostnames">
<code class="descname">--sslAllowInvalidHostnames</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-sslallowinvalidhostnames" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsallowinvalidhostnames"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowInvalidHostnames</span></code></a> instead.</p>
</div>
<p>Disables the validation of the hostnames in TLS/SSL certificates,
when connecting to other members of the replica set or sharded cluster
for inter-process authentication. This allows <strong class="program">mongod</strong> to connect
to other members if the hostnames in their certificates do not match
their configured hostname.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslallowconnectionswithoutcertificates">
<code class="descname">--sslAllowConnectionsWithoutCertificates</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-sslallowconnectionswithoutcertificates" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsallowconnectionswithoutcertificates"><code class="xref std std-option docutils literal"><span class="pre">--tlsAllowConnectionsWithoutCertificates</span></code></a> instead.</p>
</div>
<p>For clients that do not present certificates, <strong class="program">mongod</strong> bypasses
TLS/SSL certificate validation when establishing the connection.</p>
<p>For clients that present a certificate, however, <strong class="program">mongod</strong> performs
certificate validation using the root certificate chain specified by
<code class="docutils literal"><span class="pre">--sslCAFile</span></code> and reject clients with invalid certificates.</p>
<p>Use the <a class="reference internal" href="#cmdoption-mongod-sslallowconnectionswithoutcertificates"><code class="xref std std-option docutils literal"><span class="pre">--sslAllowConnectionsWithoutCertificates</span></code></a> option if you have a mixed deployment that includes
clients that do not or cannot present certificates to the <strong class="program">mongod</strong>.</p>
<p>For more information about TLS/SSL and MongoDB, see
<a class="reference internal" href="../../tutorial/configure-ssl.html"><span class="doc">Configure mongod and mongos for TLS/SSL</span></a> and
<a class="reference internal" href="../../tutorial/configure-ssl-clients.html"><span class="doc">TLS/SSL Configuration for Clients</span></a> .</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-ssldisabledprotocols">
<code class="descname">--sslDisabledProtocols</code><code class="descclassname"> &lt;protocol(s)&gt;</code><a class="headerlink" href="#cmdoption-mongod-ssldisabledprotocols" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsdisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--tlsDisabledProtocols</span></code></a> instead.</p>
</div>
<p>Prevents a MongoDB server running with TLS/SSL from accepting
incoming connections that use a specific protocol or protocols. To
specify multiple protocols, use a comma separated list of protocols.</p>
<p><a class="reference internal" href="#cmdoption-mongod-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span></code></a> recognizes the following protocols: <code class="docutils literal"><span class="pre">TLS1_0</span></code>, <code class="docutils literal"><span class="pre">TLS1_1</span></code>,
<code class="docutils literal"><span class="pre">TLS1_2</span></code>, and starting in version 4.0.4 (and 3.6.9 and 3.4.24), <code class="docutils literal"><span class="pre">TLS1_3</span></code>.</p>
<ul class="simple">
<li>On macOS, you cannot disable <code class="docutils literal"><span class="pre">TLS1_1</span></code> and leave both <code class="docutils literal"><span class="pre">TLS1_0</span></code> and
<code class="docutils literal"><span class="pre">TLS1_2</span></code> enabled. You must disable at least one of the other
two, for example, <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>To list multiple protocols, specify as a comma separated list of
protocols. For example <code class="docutils literal"><span class="pre">TLS1_0,TLS1_1</span></code>.</li>
<li>Specifying an unrecognized protocol will prevent the server from
starting.</li>
<li>The specified disabled protocols overrides any default disabled
protocols.</li>
</ul>
<p>Starting in version 4.0, MongoDB disables the use of TLS 1.0 if TLS
1.1+ is available on the system. To enable the disabled TLS 1.0,
specify <code class="docutils literal"><span class="pre">none</span></code> to <a class="reference internal" href="#cmdoption-mongod-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span></code></a>. See <a class="reference internal" href="../../release-notes/4.0.html#disable-tls"><span class="std std-ref">Disable TLS 1.0</span></a>.</p>
<p>Members of replica sets and sharded clusters must speak at least one
protocol in common.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../../tutorial/configure-ssl.html#ssl-disallow-protocols"><span class="std std-ref">Disallow Protocols</span></a></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-sslfipsmode">
<code class="descname">--sslFIPSMode</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-sslfipsmode" title="Permalink to this definition">¶</a></dt>
<dd><div class="deprecated">
<p><span class="versionmodified">Deprecated since version 4.2: </span>Use <a class="reference internal" href="#cmdoption-mongod-tlsfipsmode"><code class="xref std std-option docutils literal"><span class="pre">--tlsFIPSMode</span></code></a> instead.</p>
</div>
<p>Directs the <strong class="program">mongod</strong> to use the FIPS mode of the  TLS/SSL
library. Your system must have a FIPS
compliant library to use the <a class="reference internal" href="#cmdoption-mongod-sslfipsmode"><code class="xref std std-option docutils literal"><span class="pre">--sslFIPSMode</span></code></a> option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">FIPS-compatible TLS/SSL is
available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>. See
<a class="reference internal" href="../../tutorial/configure-fips.html"><span class="doc">Configure MongoDB for FIPS</span></a> for more information.</p>
</div>
</dd></dl>

</div>
<div class="section" id="profiler-options">
<h3>Profiler Options<a class="headerlink" href="#profiler-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-profile">
<code class="descname">--profile</code><code class="descclassname"> &lt;level&gt;</code><a class="headerlink" href="#cmdoption-mongod-profile" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 0</p>
<p>Configures the <a class="reference internal" href="../../tutorial/manage-the-database-profiler.html"><span class="doc">database profiler</span></a> level.
The following profiler levels are available:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Level</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">0</span></code></td>
<td>The profiler is off and does not collect any data.
This is the default profiler level.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">1</span></code></td>
<td>The profiler collects data for operations that take longer
than the value of <code class="docutils literal"><span class="pre">slowms</span></code>.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">2</span></code></td>
<td>The profiler collects data for all operations.</td>
</tr>
</tbody>
</table>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p>Profiling can impact performance and shares settings with the system
log. Carefully consider any performance and security implications
before configuring and enabling the profiler on a production
deployment.</p>
<p class="last">See <a class="reference internal" href="../../tutorial/manage-the-database-profiler.html#database-profiling-overhead"><span class="std std-ref">Profiler Overhead</span></a> for more information on
potential performance degradation.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-slowms">
<code class="descname">--slowms</code><code class="descclassname"> &lt;integer&gt;</code><a class="headerlink" href="#cmdoption-mongod-slowms" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 100</p>
<p>The <em>slow</em> operation time threshold, in milliseconds. Operations
that run for longer than this threshold are considered <em>slow</em>.</p>
<p>When <a class="reference internal" href="../parameters.html#param.logLevel" title="param.logLevel"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">logLevel</span></code></a> is set to <code class="docutils literal"><span class="pre">0</span></code>, MongoDB records <em>slow</em>
operations to the diagnostic log at a rate determined by
<a class="reference internal" href="../configuration-options.html#operationProfiling.slowOpSampleRate" title="operationProfiling.slowOpSampleRate"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">slowOpSampleRate</span></code></a>. Starting in MongoDB
4.2, the secondaries of replica sets log <a class="reference internal" href="../../release-notes/4.2.html#slow-oplog"><span class="std std-ref">all oplog entry messages
that take longer than the slow operation threshold to apply</span></a> regardless of the sample rate.</p>
<p>At higher <a class="reference internal" href="../parameters.html#param.logLevel" title="param.logLevel"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">logLevel</span></code></a> settings, all operations appear in
the diagnostic log regardless of their latency with the following
exception: the logging of <a class="reference internal" href="../../release-notes/4.2.html#slow-oplog"><span class="std std-ref">slow oplog entry messages by the
secondaries</span></a>. The secondaries log only the slow oplog
entries; increasing the <a class="reference internal" href="../parameters.html#param.logLevel" title="param.logLevel"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">logLevel</span></code></a> does not log all
oplog entries.</p>
<p>For <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances, <a class="reference internal" href="#cmdoption-mongod-slowms"><code class="xref std std-option docutils literal"><span class="pre">--slowms</span></code></a> affects the diagnostic log
and, if enabled, the profiler.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../../tutorial/manage-the-database-profiler.html"><span class="doc">Database Profiler</span></a></p>
</div>
</dd></dl>

<span class="target" id="cli-mongod-profiler-slowopsamplerate"></span><dl class="option">
<dt id="cmdoption-mongod-slowopsamplerate">
<code class="descname">--slowOpSampleRate</code><code class="descclassname"> &lt;double&gt;</code><a class="headerlink" href="#cmdoption-mongod-slowopsamplerate" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 1.0</p>
<p>The fraction of <em>slow</em> operations that should be profiled or logged.
<a class="reference internal" href="#cmdoption-mongod-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a> accepts values between 0 and 1, inclusive.</p>
<p><a class="reference internal" href="#cmdoption-mongod-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a> does not affect the <a class="reference internal" href="../../release-notes/4.2.html#slow-oplog"><span class="std std-ref">slow oplog entry logging</span></a> by the secondary members of a replica set. Secondary
members log all oplog entries that take longer than the slow
operation threshold regardless of the <a class="reference internal" href="#cmdoption-mongod-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a>.</p>
<p>For <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances, <a class="reference internal" href="#cmdoption-mongod-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a> affects the
diagnostic log and, if enabled, the profiler.</p>
</dd></dl>

</div>
<div class="section" id="audit-options">
<h3>Audit Options<a class="headerlink" href="#audit-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-auditdestination">
<code class="descname">--auditDestination</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-auditdestination" title="Permalink to this definition">¶</a></dt>
<dd><p>Enables <a class="reference internal" href="../../core/auditing.html"><span class="doc">auditing</span></a> and specifies where
<strong class="program">mongod</strong> sends all audit events.</p>
<p><a class="reference internal" href="#cmdoption-mongod-auditdestination"><code class="xref std std-option docutils literal"><span class="pre">--auditDestination</span></code></a> can have one of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">syslog</span></code></td>
<td><p class="first">Output the audit events to syslog in JSON format. Not available on
Windows. Audit messages have a syslog severity level of <code class="docutils literal"><span class="pre">info</span></code>
and a facility level of <code class="docutils literal"><span class="pre">user</span></code>.</p>
<p class="last">The syslog message limit can result in the truncation of
audit messages. The auditing system will neither detect the
truncation nor error upon its occurrence.</p>
</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">console</span></code></td>
<td>Output the audit events to <code class="docutils literal"><span class="pre">stdout</span></code> in JSON format.</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">file</span></code></td>
<td>Output the audit events to the file specified in
<a class="reference internal" href="#cmdoption-mongod-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a> in the format specified in
<a class="reference internal" href="#cmdoption-mongod-auditformat"><code class="xref std std-option docutils literal"><span class="pre">--auditFormat</span></code></a>.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-auditformat">
<code class="descname">--auditFormat</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-auditformat" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the format of the output file for <a class="reference internal" href="../../core/auditing.html"><span class="doc">auditing</span></a> if <a class="reference internal" href="#cmdoption-mongod-auditdestination"><code class="xref std std-option docutils literal"><span class="pre">--auditDestination</span></code></a> is <code class="docutils literal"><span class="pre">file</span></code>. The
<a class="reference internal" href="#cmdoption-mongod-auditformat"><code class="xref std std-option docutils literal"><span class="pre">--auditFormat</span></code></a> option can have one of the following values:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Value</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">JSON</span></code></td>
<td>Output the audit events in JSON format to the file specified
in <a class="reference internal" href="#cmdoption-mongod-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a>.</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">BSON</span></code></td>
<td>Output the audit events in BSON binary format to the file
specified in <a class="reference internal" href="#cmdoption-mongod-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a>.</td>
</tr>
</tbody>
</table>
<p>Printing audit events to a file in JSON format degrades server
performance more than printing to a file in BSON format.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-auditpath">
<code class="descname">--auditPath</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-auditpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the output file for <a class="reference internal" href="../../core/auditing.html"><span class="doc">auditing</span></a> if
<a class="reference internal" href="#cmdoption-mongod-auditdestination"><code class="xref std std-option docutils literal"><span class="pre">--auditDestination</span></code></a> has value of <code class="docutils literal"><span class="pre">file</span></code>. The <a class="reference internal" href="#cmdoption-mongod-auditpath"><code class="xref std std-option docutils literal"><span class="pre">--auditPath</span></code></a>
option can take either a full path name or a relative path name.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-auditfilter">
<code class="descname">--auditFilter</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-auditfilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies the filter to limit the <a class="reference internal" href="../audit-message.html#audit-action-details-results"><span class="std std-ref">types of operations</span></a> the <a class="reference internal" href="../../core/auditing.html"><span class="doc">audit system</span></a> records. The option takes a string representation
of a query document of the form:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="o">&lt;</span><span class="nx">field1</span><span class="o">&gt;:</span> <span class="o">&lt;</span><span class="nx">expression1</span><span class="o">&gt;</span><span class="p">,</span> <span class="p">...</span> <span class="p">}</span>
</pre></div>
</div>
</div>
<p>The <code class="docutils literal"><span class="pre">&lt;field&gt;</span></code> can be <a class="reference internal" href="../audit-message.html"><span class="doc">any field in the audit message</span></a>, including fields returned in the
<a class="reference internal" href="../audit-message.html#audit-action-details-results"><span class="std std-ref">param</span></a> document. The
<code class="docutils literal"><span class="pre">&lt;expression&gt;</span></code> is a <a class="reference internal" href="../operator/query.html#query-selectors"><span class="std std-ref">query condition expression</span></a>.</p>
<p>To specify an audit filter, enclose the filter document in single
quotes to pass the document as a string.</p>
<p>To specify the audit filter in a <a class="reference internal" href="../configuration-options.html"><span class="doc">configuration file</span></a>, you must use the YAML format of
the configuration file.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Available only in <a class="reference external" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?jmp=docs">MongoDB Enterprise</a>
and <a class="reference external" href="https://cloud.mongodb.com/user#/atlas/login">MongoDB Atlas</a>.</p>
</div>
</dd></dl>

</div>
<div class="section" id="snmp-options">
<h3>SNMP Options<a class="headerlink" href="#snmp-options" title="Permalink to this headline">¶</a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">MongoDB Enterprise on macOS does <em>not</em> include support for SNMP due
to <a class="reference external" href="https://jira.mongodb.org/browse/SERVER-29352">SERVER-29352</a>.</p>
</div>
<dl class="option">
<dt id="cmdoption-mongod-snmp-disabled">
<code class="descname">--snmp-disabled</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-snmp-disabled" title="Permalink to this definition">¶</a></dt>
<dd><p>Disables SNMP access to <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>. The option is incompatible
with <a class="reference internal" href="#cmdoption-mongod-snmp-subagent"><code class="xref std std-option docutils literal"><span class="pre">--snmp-subagent</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-snmp-master"><code class="xref std std-option docutils literal"><span class="pre">--snmp-master</span></code></a>.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 4.0.6.</span></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-snmp-subagent">
<code class="descname">--snmp-subagent</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-snmp-subagent" title="Permalink to this definition">¶</a></dt>
<dd><p>Runs SNMP as a subagent. The option is incompatible with <a class="reference internal" href="#cmdoption-mongod-snmp-disabled"><code class="xref std std-option docutils literal"><span class="pre">--snmp-disabled</span></code></a>.</p>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-snmp-master">
<code class="descname">--snmp-master</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-snmp-master" title="Permalink to this definition">¶</a></dt>
<dd><p>Runs SNMP as a master. The option is incompatible with <a class="reference internal" href="#cmdoption-mongod-snmp-disabled"><code class="xref std std-option docutils literal"><span class="pre">--snmp-disabled</span></code></a>.</p>
</dd></dl>

<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<ul class="last simple">
<li><a class="reference internal" href="../../tutorial/monitor-with-snmp.html"><span class="doc">Monitor MongoDB With SNMP on Linux</span></a></li>
<li><a class="reference internal" href="../../tutorial/monitor-with-snmp-on-windows.html"><span class="doc">Monitor MongoDB Windows with SNMP</span></a></li>
<li><a class="reference internal" href="../../tutorial/troubleshoot-snmp.html"><span class="doc">Troubleshoot SNMP</span></a></li>
</ul>
</div>
</div>
<div class="section" id="inmemory-options">
<span id="cli-mongod-inmemory"></span><h3>inMemory Options<a class="headerlink" href="#inmemory-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-inmemorysizegb">
<code class="descname">--inMemorySizeGB</code><code class="descclassname"> &lt;float&gt;</code><a class="headerlink" href="#cmdoption-mongod-inmemorysizegb" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 50% of physical RAM less 1 GB</p>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 3.4: </span>Values can range from 256MB to 10TB and can be a float.</p>
</div>
<p>Maximum amount of memory to allocate for <a class="reference internal" href="../../core/inmemory.html"><span class="doc">in-memory storage
engine</span></a> data, including indexes, oplog if the
<a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> is part of replica set, replica set or sharded
cluster metadata, etc.</p>
<p>By default, the in-memory storage engine uses 50% of physical RAM minus
1 GB.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

</div>
<div class="section" id="encryption-key-management-options">
<span id="id16"></span><h3>Encryption Key Management Options<a class="headerlink" href="#encryption-key-management-options" title="Permalink to this headline">¶</a></h3>
<dl class="option">
<dt id="cmdoption-mongod-enableencryption">
<code class="descname">--enableEncryption</code><code class="descclassname"> &lt;boolean&gt;</code><a class="headerlink" href="#cmdoption-mongod-enableencryption" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: false</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>Enables encryption for the WiredTiger storage engine. You must set
to <code class="docutils literal"><span class="pre">true</span></code> to pass in encryption keys and configurations.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-encryptionciphermode">
<code class="descname">--encryptionCipherMode</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-encryptionciphermode" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: AES256-CBC</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>The cipher mode to use for encryption at rest:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="35%" />
<col width="65%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Mode</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">AES256-CBC</span></code></td>
<td>256-bit Advanced Encryption Standard in Cipher Block Chaining
Mode</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">AES256-GCM</span></code></td>
<td><p class="first">256-bit Advanced Encryption Standard in Galois/Counter Mode</p>
<div class="last versionchanged">
<p><span class="versionmodified">Changed in version 4.0: </span>MongoDB Enterprise on Windows no longer supports <code class="docutils literal"><span class="pre">AES256-GCM</span></code>. This
cipher is now available only on Linux.</p>
</div>
</td>
</tr>
</tbody>
</table>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-encryptionkeyfile">
<code class="descname">--encryptionKeyFile</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-encryptionkeyfile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>The path to the local keyfile when managing keys via process <em>other
than</em> KMIP. Only set when managing keys via process other than KMIP.
If data is already encrypted using KMIP, MongoDB will throw an error.</p>
<p>The keyfile can contain only a single key. The key is either a 16 or
32 character string.</p>
<p>Requires <code class="xref mongodb mongodb-setting docutils literal"><span class="pre">enableEncryption</span></code> to be <code class="docutils literal"><span class="pre">true</span></code>.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipkeyidentifier">
<code class="descname">--kmipKeyIdentifier</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipkeyidentifier" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>Unique KMIP identifier for an existing key within the KMIP server.
Include to use the key associated with the identifier as the system
key. You can only use the setting the first time you enable
encryption for the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance. Requires
<code class="xref mongodb mongodb-setting docutils literal"><span class="pre">enableEncryption</span></code> to be true.</p>
<p>If unspecified, MongoDB will request that the KMIP server create a
new key to utilize as the system key.</p>
<p>If the KMIP server cannot locate a key with the specified identifier
or the data is already encrypted with a key, MongoDB will throw an
error</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmiprotatemasterkey">
<code class="descname">--kmipRotateMasterKey</code><code class="descclassname"> &lt;boolean&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmiprotatemasterkey" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: false</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>If true, rotate the master key and re-encrypt the internal
keystore.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../../tutorial/rotate-encryption-key.html#kmip-master-key-rotation"><span class="std std-ref">KMIP Master Key Rotation</span></a></p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipservername">
<code class="descname">--kmipServerName</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipservername" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>Hostname or IP address of key management solution running a KMIP
server. Requires <code class="xref mongodb mongodb-setting docutils literal"><span class="pre">enableEncryption</span></code> to be true.</p>
<p>When connecting to the KMIP server, the <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>
verifies that the specified <a class="reference internal" href="#cmdoption-mongod-kmipservername"><code class="xref std std-option docutils literal"><span class="pre">--kmipServerName</span></code></a> matches the Subject Alternative
Name <code class="docutils literal"><span class="pre">SAN</span></code> (or, if <code class="docutils literal"><span class="pre">SAN</span></code> is not present, the Common Name <code class="docutils literal"><span class="pre">CN</span></code>)
in the certificate presented by the KMIP server. If <code class="docutils literal"><span class="pre">SAN</span></code> is
present, <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> does not match against the <code class="docutils literal"><span class="pre">CN</span></code>. If
the hostname does not match the <code class="docutils literal"><span class="pre">SAN</span></code> (or <code class="docutils literal"><span class="pre">CN</span></code>), the
<a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> will fail to connect.</p>
<p>Starting in MongoDB 4.2, when performing comparison of SAN, MongoDB
supports comparison of DNS names or IP addresses. In previous versions,
MongoDB only supports comparisons of DNS names.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipport">
<code class="descname">--kmipPort</code><code class="descclassname"> &lt;number&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipport" title="Permalink to this definition">¶</a></dt>
<dd><p><em>Default</em>: 5696</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>Port number the KMIP server is listening on. Requires that a
<code class="xref mongodb mongodb-setting docutils literal"><span class="pre">kmipServerName</span></code> be provided. Requires
<code class="xref mongodb mongodb-setting docutils literal"><span class="pre">enableEncryption</span></code> to be true.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipclientcertificateselector">
<code class="descname">--kmipClientCertificateSelector</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipclientcertificateselector" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.0: </span>Available on Windows and macOS as an alternative to
<a class="reference internal" href="#cmdoption-mongod-kmipclientcertificatefile"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateFile</span></code></a>.</p>
<p><a class="reference internal" href="#cmdoption-mongod-kmipclientcertificatefile"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateFile</span></code></a> and <a class="reference internal" href="#cmdoption-mongod-kmipclientcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateSelector</span></code></a> options are mutually exclusive. You can only
specify one.</p>
</div>
<p>Specifies a certificate property in order to select a matching
certificate from the operating system’s certificate store to
authenticate MongoDB to the KMIP server.</p>
<p><a class="reference internal" href="#cmdoption-mongod-kmipclientcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateSelector</span></code></a> accepts an argument of the format <code class="docutils literal"><span class="pre">&lt;property&gt;=&lt;value&gt;</span></code>
where the property can be one of the following:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value type</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><code class="docutils literal"><span class="pre">subject</span></code></td>
<td>ASCII string</td>
<td>Subject name or common name on certificate</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal"><span class="pre">thumbprint</span></code></td>
<td>hex string</td>
<td><p class="first">A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.</p>
<p class="last">The <code class="docutils literal"><span class="pre">thumbprint</span></code> is sometimes referred to as a
<code class="docutils literal"><span class="pre">fingerprint</span></code>.</p>
</td>
</tr>
</tbody>
</table>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipclientcertificatefile">
<code class="descname">--kmipClientCertificateFile</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipclientcertificatefile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>String containing the path to the client certificate used for
authenticating MongoDB to the KMIP server. Requires that a
<code class="xref mongodb mongodb-setting docutils literal"><span class="pre">kmipServerName</span></code> be provided.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in 4.0, on macOS or Windows, you can use a certificate
from the operating system’s secure store instead of a PEM key
file. See <a class="reference internal" href="#cmdoption-mongod-kmipclientcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateSelector</span></code></a>.</p>
</div>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipclientcertificatepassword">
<code class="descname">--kmipClientCertificatePassword</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipclientcertificatepassword" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>The password (if one exists) for the client certificate passed into
<code class="xref mongodb mongodb-setting docutils literal"><span class="pre">kmipClientCertificateFile</span></code>. Is used for
authenticating MongoDB to the KMIP server. Requires that a
<code class="xref mongodb mongodb-setting docutils literal"><span class="pre">kmipClientCertificateFile</span></code> be provided.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-kmipservercafile">
<code class="descname">--kmipServerCAFile</code><code class="descclassname"> &lt;string&gt;</code><a class="headerlink" href="#cmdoption-mongod-kmipservercafile" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 3.2.</span></p>
</div>
<p>Path to CA File. Used for validating secure client connection to
KMIP server.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Starting in 4.0, on macOS or Windows, you can use a certificate
from the operating system’s secure store instead of a PEM key
file. See <a class="reference internal" href="#cmdoption-mongod-kmipclientcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateSelector</span></code></a>. When using the secure store, you do not
need to, but can, also specify the <a class="reference internal" href="#cmdoption-mongod-kmipservercafile"><code class="xref std std-option docutils literal"><span class="pre">--kmipServerCAFile</span></code></a>.</p>
</div>
</dd></dl>

<dl class="option">
<dt id="cmdoption-mongod-esedatabasekeyrollover">
<code class="descname">--eseDatabaseKeyRollover</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mongod-esedatabasekeyrollover" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified">New in version 4.2.</span></p>
</div>
<p>Roll over the <a class="reference internal" href="../../core/security-encryption-at-rest.html#encrypted-storage-engine"><span class="std std-ref">encrypted storage engine</span></a> database keys configured with
<code class="docutils literal"><span class="pre">AES256-GCM</span></code> cipher.</p>
<p>When <a class="reference internal" href="#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instance is started with this option, the
instance rotates the keys and exits.</p>
<div class="admonition-enterprise-feature admonition">
<p class="first admonition-title">Enterprise Feature</p>
<p class="last">Available in MongoDB Enterprise only.</p>
</div>
</dd></dl>

</div>
</div>
</div>

                
    <div id="btnv">
      <span class="btn-arrow-left">&larr; &nbsp;</span>
      <a class="btn-prev-text" href="../program.html" title="Previous Section: MongoDB Package Components"><span>MongoDB Package Components</span></a>
      <a class="btn-next-text" href="mongos.html" title="Next Section: mongos"><span>mongos</span></a>
      <span class="btn-arrow-right">&nbsp;&rarr;</span>
    </div>
                  <div class="footer">
                    <div class="copyright">
                      <p>&copy; MongoDB, Inc 2008-present. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc.</p>
                    </div>
                  </div>
              </div></div>
            </div>
        </div>
    </div>
    <div class="right-column">
      <div class="wrapper"> <div id='mongodb-docs-1'>
   <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('mongodb-docs-1'); });
   </script>
</div>
            <div class="social">
               <a class="slack-icon" href="https://slackpass.io/mongo-db?jmp=docs" title="https://slackpass.io/mongo-db?jmp=docs"><i class="fab fa-slack" aria-hidden="true"></i></a>
               <a class="twitter-icon" href="https://twitter.com/MongoDB" title="https://twitter.com/MongoDB"><i class="fab fa-twitter-square"></i></a>
               <a class="youtube-icon" href="https://www.youtube.com/user/MongoDB" title="https://www.youtube.com/user/MongoDB"><i class="fab fa-youtube-square"></i></a>
               <a class="facebook-icon" href="https://www.facebook.com/mongodb" title="https://www.facebook.com/mongodb"><i class="fab fa-facebook-square"></i></a>
               <a class="stack-overflow-icon" href="https://stackoverflow.com/tags/mongodb/info" title="https://stackoverflow.com/tags/mongodb/info"><i class="fab fa-stack-overflow" aria-hidden="true"></i></a>
            </div>
        

      </div>
    </div>
    
      <div id="rating-panel"></div>
    
    <div class="clearfix"></div>
  </div>
  

  <script type="text/javascript">
  // Bootstrap array of links that should trigger a full page reload
  window.docsExcludedNav = ['/administration', '/administration/production-checklist', '/administration/indexes-management', '/aggregation', '/applications/geospatial-indexes', '/applications/indexes', '/contributors/getting-started', '/core/2d', '/core/2dsphere', '/core/auditing', '/core/authentication', '/core/authorization', '/core/backups', '/core/read-isolation-consistency-recency', '/core/databases-and-collections', '/core/geohaystack', '/core/index-single', '/core/index-compound', '/core/index-creation', '/core/index-hashed', '/core/index-multikey', '/core/index-partial', '/core/index-sparse', '/core/index-text', '/core/index-ttl', '/core/index-unique', '/core/index-wildcard', '/core/journaling', '/core/kerberos', '/core/map-reduce', '/core/operational-segregation', '/core/query-optimization', '/core/read-preference', '/core/replica-set-architectures', '/core/replica-set-high-availability', '/core/replica-set-members', '/core/replica-set-secondary', '/core/transactions', '/geospatial-queries', '/replication', '/core/sharded-cluster-components', '/core/wiredtiger', '/core/write-operations-atomicity', '/crud', '/indexes', '/installation', '/introduction', '/mongo', '/products/bi-connector', '/reference/command', '/reference/collation', '/text-search', '/tutorial/manage-the-database-profiler', '/core/index-text', '/reference/bson-types', '/reference/configuration-options', '/reference/indexes', '/reference/method', '/reference/operator/aggregation', '/reference/operator/query', '/reference/operator/query-modifier', '/reference/operator/update', '/reference/replication', '/reference/read-concern', '/reference/security', '/reference/sharding', '/reference/write-concern', '/release-notes/2.4', '/release-notes/2.6', '/release-notes/2.8', '/release-notes/3.0', '/release-notes/3.2', '/release-notes/3.4', '/release-notes/3.6', '/release-notes/4.0', '/release-notes/4.2', '/security', '/sharding', '/changeStreams', '/core/zone-sharding', '/core/hashed-sharding', '/core/ranged-sharding', '/storage', '/tutorial/change-sharded-cluster-wiredtiger', '/tutorial/insert-documents', '/tutorial/query-documents', '/tutorial/remove-documents', '/tutorial/update-documents', '/tutorial/enable-authentication', '/tutorial/install-mongodb-on-ubuntu', '/tutorial/install-mongodb-on-windows', '/tutorial/install-mongodb-on-red-hat', '/tutorial/install-mongodb-on-debian', '/tutorial/install-mongodb-on-suse', '/tutorial/install-mongodb-on-amazon', '/tutorial/install-mongodb-enterprise-on-ubuntu', '/tutorial/install-mongodb-enterprise-on-windows', '/tutorial/install-mongodb-enterprise-on-red-hat', '/tutorial/install-mongodb-enterprise-on-debian', '/tutorial/install-mongodb-enterprise-on-suse', '/tutorial/install-mongodb-enterprise-on-amazon', '/tutorial/install-mongodb-on-os-x'];
  </script></body>
</html>